diff --git a/base/src/text-control.ts b/base/src/text-control.ts index 668d8da..d43ea88 100644 --- a/base/src/text-control.ts +++ b/base/src/text-control.ts @@ -3,3 +3,5 @@ export type Size = 'small' | 'medium' | 'large'; export type Variant = 'default' | 'alternate'; export type InputType = 'text' | 'search'; + +export type InputMode = 'none' | 'numeric' | 'decimal' | InputType; diff --git a/categories/action/react/.eslintrc b/categories/action/react/.eslintrc index 7d22244..8a6172f 100644 --- a/categories/action/react/.eslintrc +++ b/categories/action/react/.eslintrc @@ -1,5 +1,10 @@ { "root": true, + "rules": { + "quote-props": "off", + "react/jsx-props-no-spreading": "off", + "react/button-has-type": "off" + }, "extends": [ "lxsmnsyc/typescript/react" ], diff --git a/categories/action/react/src/components/ActionButton/index.tsx b/categories/action/react/src/components/ActionButton/index.tsx index 113fb8e..b72c44d 100644 --- a/categories/action/react/src/components/ActionButton/index.tsx +++ b/categories/action/react/src/components/ActionButton/index.tsx @@ -6,7 +6,7 @@ export type ActionButtonDerivedElement = HTMLButtonElement; export interface ActionButtonProps extends Omit, 'type' | 'size'> { type?: Button.Type; - variant: Button.Variant; + variant?: Button.Variant; block?: boolean; subtext?: React.ReactNode; badge?: React.ReactNode; @@ -15,19 +15,22 @@ export interface ActionButtonProps extends Omit(({ - type = 'button' as const, - variant, - subtext, - badge, - menuItem = false, - children, - size = 'medium' as const, - compact = false, - className, - block = false, - ...etcProps -}, forwardedRef) => ( +export const ActionButton = React.forwardRef(( + { + type = 'button' as const, + variant = 'bare' as const, + subtext, + badge, + menuItem = false, + children, + size = 'medium' as const, + compact = false, + className, + block = false, + ...etcProps + }, + forwardedRef, +) => (