diff options
Diffstat (limited to 'app/components/styled')
| -rw-r--r-- | app/components/styled/AppButton.js | 4 | ||||
| -rw-r--r-- | app/components/styled/Button.js | 7 | ||||
| -rw-r--r-- | app/components/styled/CellButton.js | 5 |
3 files changed, 11 insertions, 5 deletions
diff --git a/app/components/styled/AppButton.js b/app/components/styled/AppButton.js index f868d33ce0..fdb6d35dfa 100644 --- a/app/components/styled/AppButton.js +++ b/app/components/styled/AppButton.js @@ -1,5 +1,5 @@ // @flow -import React from 'react'; +import * as React from 'react'; import { Text, Component } from 'reactxp'; import { Button } from './Button'; import { colors } from '../../config'; @@ -76,7 +76,7 @@ export class Label extends Text {} class BaseButton extends Component { props: { - children: Array<React.Element<*>> | React.Element<*>, + children?: React.Node, disabled: boolean, }; diff --git a/app/components/styled/Button.js b/app/components/styled/Button.js index 59d2371480..2fef7361e2 100644 --- a/app/components/styled/Button.js +++ b/app/components/styled/Button.js @@ -7,7 +7,12 @@ const defaultStyle = ReactXP.Styles.createViewStyle({ cursor: 'default', }); -export function Button(props: *) { +type Props = { + style?: Object | Array<any>; + cursor?: string; +}; + +export function Button(props: Props) { const { style, cursor, ...rest } = props; const concreteStyle = ReactXP.Styles.combine([defaultStyle, style]); diff --git a/app/components/styled/CellButton.js b/app/components/styled/CellButton.js index fe3042709a..064c28ca2c 100644 --- a/app/components/styled/CellButton.js +++ b/app/components/styled/CellButton.js @@ -1,5 +1,6 @@ // @flow -import React from 'react'; + +import * as React from 'react'; import { Text, Component } from 'reactxp'; import { Button } from './Button'; import { colors } from '../../config'; @@ -66,7 +67,7 @@ export class Label extends Text {} export default class CellButton extends Component { props: { - children: Array<React.Element<*>> | React.Element<*>, + children?: React.Node, disabled: boolean, }; |
