stricter types (#134)

This commit is contained in:
YJ 2018-07-10 23:49:35 -07:00 committed by Jaco Greeff
parent 0f5b461fd5
commit aaf7286042
8 changed files with 9 additions and 9 deletions

View File

@ -17,7 +17,7 @@ import translate from '../translate';
import Item from './Item';
type Props = I18nProps & {
children?: any // React$Node
children?: React.ReactNode
};
function SideBar ({ children, className, style, t }: Props) {

View File

@ -7,7 +7,7 @@ import { BareProps } from '../types';
export type Button$Sizes = 'mini' | 'tiny' | 'small' | 'medium' | 'large' | 'big' | 'huge' | 'massive';
export type ButtonProps = BareProps & {
children?: any,
children?: React.ReactNode,
floated?: 'left' | 'right',
icon?: string,
isBasic?: boolean,
@ -23,7 +23,7 @@ export type ButtonProps = BareProps & {
export type DividerProps = BareProps;
export type GroupProps = BareProps & {
children?: any
children?: React.ReactNode
};
export type GroupType = React.ComponentType<GroupProps> & {

View File

@ -14,7 +14,7 @@ import Labelled from './Labelled';
type Input$Type = 'number' | 'password' | 'text';
type Props = BareProps & {
children?: any, // node?
children?: React.ReactNode,
defaultValue?: any,
icon?: any, // node?
isAction?: boolean,

View File

@ -11,7 +11,7 @@ import Labelled from './Labelled';
import classes from './util/classes';
type Props = BareProps & {
children?: any, // node?,
children?: React.ReactNode,
isError?: boolean,
isHidden?: boolean,
label?: any, // node?

View File

@ -11,7 +11,7 @@ import Input from './Input';
type Props = BareProps & {
defaultValue?: any,
children?: any, // node?
children?: React.ReactNode,
isDisabled?: boolean,
isError?: boolean,
label?: string,

View File

@ -9,7 +9,7 @@ import React from 'react';
import Labelled from './Labelled';
type Props = BareProps & {
children?: any, // node?
children?: React.ReactNode,
isHidden?: boolean,
label?: any, // node?
value?: any, // node?

View File

@ -41,7 +41,7 @@ export type RxProps<T> = {
}
export type BaseProps<T> = BareProps & ApiProps & ChangeProps<T> & ParamProps & RxProps<T> & {
children?: any, // node?
children?: React.ReactNode,
label?: string,
render?: (value?: T) => any // node?
};

View File

@ -18,7 +18,7 @@ import addressEncode from '@polkadot/util-keyring/address/encode';
import translate from './translate';
type Props = I18nProps & {
children?: any, // node?
children?: React.ReactNode,
value: QueueTx
};