feat(Button): add icon-prefix prop (#5666)

This commit is contained in:
chenjiahan
2020-02-28 15:40:46 +08:00
parent 09b57901f5
commit 130e1ac7a6
9 changed files with 16 additions and 11 deletions

View File

@@ -31,6 +31,7 @@ export type ButtonProps = RouteProps & {
hairline?: boolean;
disabled?: boolean;
nativeType?: string;
iconPrefix?: string;
loadingSize: string;
loadingType?: LoadingType;
loadingText?: string;
@@ -119,7 +120,9 @@ function Button(
/>
);
} else if (icon) {
content.push(<Icon name={icon} class={bem('icon')} />);
content.push(
<Icon name={icon} class={bem('icon')} classPrefix={props.iconPrefix} />
);
}
let text;