🤖 Merge PR #45385 [react-native-material-ui] Fix type of size to by @bdenhollander

* Fix type of size to match source code

Expected type is number:
https://github.com/xotahal/react-native-material-ui/blob/master/src/Badge/Badge.react.js#L27

* Additional Badge tests
This commit is contained in:
bdenhollander 2020-06-15 08:04:52 -04:00 committed by GitHub
parent 5074c95e15
commit a8f3270103
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -54,7 +54,7 @@ export class Avatar extends Component<AvatarProps, any> {}
export interface BadgeProps {
children?: JSX.Element;
text?: string;
icon?: string | { name: string, color: string, size: string };
icon?: string | { name: string, color: string, size: number };
size?: number;
stroke?: number;
accent?: boolean;

View File

@ -38,6 +38,10 @@ const Example = () =>
<Avatar icon="mic" size={75} />
<Badge />
<Badge text="3" />
<Badge icon="grade" />
<Badge icon={{ name: 'grade', color: 'blue', size: 10 }} />
<Badge size={10} />
<IconToggle testID="iconToggleTestID" name="anIconToggle" />
<Button testID="buttonTestID" text="I'm a button" />