From df615c4d0b66b90b9a1ed33b6015649cfbcb9145 Mon Sep 17 00:00:00 2001 From: Patrick Yeo Date: Tue, 9 Apr 2024 15:49:02 -0700 Subject: [PATCH 1/3] chore(@clayui/form): add regular size to input storybook and make it the default value --- packages/clay-form/stories/Input.stories.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/clay-form/stories/Input.stories.tsx b/packages/clay-form/stories/Input.stories.tsx index 220bb84d21..5358872d92 100644 --- a/packages/clay-form/stories/Input.stories.tsx +++ b/packages/clay-form/stories/Input.stories.tsx @@ -12,7 +12,7 @@ export default { argTypes: { sizing: { control: {type: 'select'}, - options: ['lg', 'sm'], + options: ['lg', 'regular', 'sm'], }, }, title: 'Design System/Components/Input', @@ -27,7 +27,7 @@ export const Default = (args: any) => ( id="basicInputText" placeholder="Insert your name here" readOnly={args.readOnly} - sizing={args.sizing} + sizing={args.sizing === 'regular' ? null : args.sizing} type="text" /> @@ -37,7 +37,7 @@ export const Default = (args: any) => ( Default.args = { disabled: false, readOnly: false, - sizing: undefined, + sizing: 'regular', }; export const InputFeedback = () => ( From 53a62b1cc7ca7c80e471107ba67ddf3fdceca3ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matuzal=C3=A9m=20Teles?= Date: Wed, 17 Apr 2024 14:56:55 -0500 Subject: [PATCH 2/3] feat(@clayui/form): add regular size to input --- packages/clay-form/src/Input.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/clay-form/src/Input.tsx b/packages/clay-form/src/Input.tsx index b9b796f68c..327dbff5d7 100644 --- a/packages/clay-form/src/Input.tsx +++ b/packages/clay-form/src/Input.tsx @@ -174,7 +174,7 @@ interface IProps extends React.InputHTMLAttributes { /** * Selects the height of the input. */ - sizing?: 'lg' | 'sm'; + sizing?: 'lg' | 'regular' | 'sm'; } const ClayInput = React.forwardRef( @@ -184,7 +184,7 @@ const ClayInput = React.forwardRef( component: Component = 'input', insetAfter, insetBefore, - sizing, + sizing = 'regular', type = 'text', ...otherProps }: IProps, @@ -193,7 +193,7 @@ const ClayInput = React.forwardRef( Date: Wed, 17 Apr 2024 14:57:17 -0500 Subject: [PATCH 3/3] feat(@clayui/button): add regular size --- packages/clay-button/src/Button.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/clay-button/src/Button.tsx b/packages/clay-button/src/Button.tsx index 847c13036e..639e55159a 100644 --- a/packages/clay-button/src/Button.tsx +++ b/packages/clay-button/src/Button.tsx @@ -69,7 +69,7 @@ export interface IProps extends React.ButtonHTMLAttributes { /** * Determines the size of a button. */ - size?: 'xs' | 'sm'; + size?: 'xs' | 'regular' | 'sm'; /** * Indicates button should be a small variant. @@ -96,7 +96,7 @@ const ClayButton = React.forwardRef( monospaced, outline, rounded, - size, + size = 'regular', small, translucent, type = 'button', @@ -133,7 +133,7 @@ const ClayButton = React.forwardRef( 'btn-block': block, 'btn-monospaced': monospaced, 'btn-outline-borderless': borderless, - 'btn-sm': small && !size, + 'btn-sm': small && (!size || size === 'regular'), 'btn-translucent': translucent, 'clay-dark': dark, [`btn-${displayType}`]: @@ -141,7 +141,7 @@ const ClayButton = React.forwardRef( [`btn-outline-${displayType}`]: displayType && (outline || borderless), 'rounded-pill': rounded, - [`btn-${size}`]: size, + [`btn-${size}`]: size && size !== 'regular', })} ref={ref} type={type}