diff --git a/app/javascript/flavours/glitch/components/form_fields/emoji_text_field.stories.tsx b/app/javascript/flavours/glitch/components/form_fields/emoji_text_field.stories.tsx index aed04bbcbf..05df009ecf 100644 --- a/app/javascript/flavours/glitch/components/form_fields/emoji_text_field.stories.tsx +++ b/app/javascript/flavours/glitch/components/form_fields/emoji_text_field.stories.tsx @@ -26,13 +26,13 @@ export const Simple: Story = {}; export const WithMaxLength: Story = { args: { - maxLength: 20, + counterMax: 20, }, }; export const WithRecommended: Story = { args: { - maxLength: 20, + counterMax: 20, recommended: true, }, }; @@ -52,7 +52,7 @@ export const TextArea: Story = { value={value} onChange={setValue} label='Label' - maxLength={100} + counterMax={100} /> ); }, diff --git a/app/javascript/flavours/glitch/components/form_fields/emoji_text_field.tsx b/app/javascript/flavours/glitch/components/form_fields/emoji_text_field.tsx index ddd7099217..93deaf0dd6 100644 --- a/app/javascript/flavours/glitch/components/form_fields/emoji_text_field.tsx +++ b/app/javascript/flavours/glitch/components/form_fields/emoji_text_field.tsx @@ -26,7 +26,7 @@ import { TextInput } from './text_input_field'; export type EmojiInputProps = { value?: string; onChange?: Dispatch>; - maxLength?: number; + counterMax?: number; recommended?: boolean; } & Omit; @@ -39,6 +39,7 @@ export const EmojiTextInputField: FC< hint, hasError, maxLength, + counterMax = maxLength, recommended, disabled, ...otherProps @@ -49,7 +50,7 @@ export const EmojiTextInputField: FC< label, hint, hasError, - maxLength, + counterMax, recommended, disabled, inputRef, @@ -63,6 +64,7 @@ export const EmojiTextInputField: FC< @@ -78,7 +80,8 @@ export const EmojiTextAreaField: FC< value, label, maxLength, - recommended = false, + counterMax = maxLength, + recommended, disabled, hint, hasError, @@ -90,7 +93,7 @@ export const EmojiTextAreaField: FC< label, hint, hasError, - maxLength, + counterMax, recommended, disabled, inputRef: textareaRef, @@ -104,6 +107,7 @@ export const EmojiTextAreaField: FC<