stricter types (#134)
This commit is contained in:
parent
0f5b461fd5
commit
aaf7286042
@ -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) {
|
||||
|
||||
4
packages/ui-app/src/Button/types.d.ts
vendored
4
packages/ui-app/src/Button/types.d.ts
vendored
@ -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> & {
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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?
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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?
|
||||
|
||||
2
packages/ui-react-rx/src/types.d.ts
vendored
2
packages/ui-react-rx/src/types.d.ts
vendored
@ -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?
|
||||
};
|
||||
|
||||
@ -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
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user