Przeglądaj źródła

fix(button): button type definition (#691)

走鹃 3 lat temu
rodzic
commit
f04572c99e

+ 2 - 2
packages/semi-foundation/button/constants.ts

@@ -4,7 +4,7 @@ const cssClasses = {
     PREFIX: `${BASE_CLASS_PREFIX}-button`,
 };
 
-const strings: Record<string, any> = {
+const strings = {
     sizes: ['default', 'small', 'large'],
     iconPositions: ['left', 'right'],
     htmlTypes: ['button', 'reset', 'submit'],
@@ -12,7 +12,7 @@ const strings: Record<string, any> = {
     themes: ['solid', 'borderless', 'light'],
     DEFAULT_ICON_SIZE: 'default',
     DEFAULT_ICON_POSITION: 'left',
-};
+} as const;
 
 const numbers = {};
 

+ 1 - 1
packages/semi-ui/button/index.tsx

@@ -12,7 +12,7 @@ export { ButtonGroupProps } from './buttonGroup';
 export { SplitButtonGroupProps } from './splitButtonGroup';
 
 // eslint-disable-next-line 
-export interface ButtonProps extends IconButtonProps, BaseButtonProps {} // TODO check
+export interface ButtonProps extends IconButtonProps {} // TODO check
 class Button extends React.PureComponent<ButtonProps> {
     static propTypes = {
         ...BaseButton.propTypes,