Skip to content

Commit bee2b1d

Browse files
author
Kubit
committed
Include spellcheck prop to input
1 parent abfb28f commit bee2b1d

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

src/components/input/input.styled.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ export const InputStyled = styled.input<InputStyledProps>`
176176
}
177177
178178
&:focus-visible {
179-
${inputFocusWidthMixin}
179+
${({ styles, state }) =>
180+
styles?.[state]?.focusVisibleCustom
181+
? getStyles(styles?.[state]?.focusVisibleCustom)
182+
: inputFocusWidthMixin}
180183
}
181184
182185
&[data-truncate='true'] {

src/components/input/inputStandAlone.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ const InputStandAloneComponent = (
105105
required={props.required}
106106
rightIcon={props.rightIcon}
107107
role={props.role}
108+
spellCheck={props.spellCheck}
108109
state={state}
109110
styles={styles}
110111
type={props.type}

src/components/input/stories/argtypes.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,17 @@ export const argtypes = (variants: IThemeObjectVariants, themeSelected: string):
220220
category: CATEGORY_CONTROL.MODIFIERS,
221221
},
222222
},
223+
spellCheck: {
224+
description: 'Specifies whether the value of the input should be checked for spelling errors',
225+
control: { type: 'boolean' },
226+
type: { name: 'boolean' },
227+
table: {
228+
type: {
229+
summary: 'boolean',
230+
},
231+
category: CATEGORY_CONTROL.MODIFIERS,
232+
},
233+
},
223234
inputMode: {
224235
description: 'inputMode for the input',
225236
type: { name: 'string' },

src/components/input/types/input.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ export type IInputStandAlone = IInputComponents & {
362362
truncate?: boolean;
363363
disabledArrowUpDownInputNumber?: boolean;
364364
placeholder?: string;
365+
spellCheck?: boolean;
365366
autocomplete?: AUTOCOMPLETE_TYPE;
366367
autoCapitalize?:
367368
| 'off'

0 commit comments

Comments
 (0)