diff --git a/Gemfile.lock b/Gemfile.lock index 86fcfb84f0..4096fb39d1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -99,8 +99,8 @@ GEM ast (2.4.3) attr_required (1.0.2) aws-eventstream (1.4.0) - aws-partitions (1.1220.0) - aws-sdk-core (3.242.0) + aws-partitions (1.1222.0) + aws-sdk-core (3.243.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) diff --git a/app/javascript/mastodon/components/form_fields/emoji_text_field.stories.tsx b/app/javascript/mastodon/components/form_fields/emoji_text_field.stories.tsx index aed04bbcbf..05df009ecf 100644 --- a/app/javascript/mastodon/components/form_fields/emoji_text_field.stories.tsx +++ b/app/javascript/mastodon/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/mastodon/components/form_fields/emoji_text_field.tsx b/app/javascript/mastodon/components/form_fields/emoji_text_field.tsx index 9c29bcbf91..a57c4d1dd4 100644 --- a/app/javascript/mastodon/components/form_fields/emoji_text_field.tsx +++ b/app/javascript/mastodon/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<