Skip to content

feat(input): add new textArea comp#258

Merged
tewarig merged 4 commits into
feat/add-input-number-compfrom
feat/add-new-textArea-comp
May 29, 2026
Merged

feat(input): add new textArea comp#258
tewarig merged 4 commits into
feat/add-input-number-compfrom
feat/add-new-textArea-comp

Conversation

@tewarig
Copy link
Copy Markdown
Member

@tewarig tewarig commented May 25, 2026

add new textArea component

Screen.Recording.2026-05-25.at.11.45.31.PM.mov

@tewarig tewarig requested a review from a team as a code owner May 25, 2026 18:18
Comment on lines +122 to +131
const [trackedValue, setTrackedValue] = React.useState<string>(() =>
defaultValue !== undefined && defaultValue !== null ? String(defaultValue) : ''
);

const isControlled = value !== undefined;
const replicated = isControlled
? value === null || value === undefined
? ''
: String(value)
: trackedValue;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should ideally refactor this to some useControllableState.

@tewarig tewarig changed the title feat: add new textArea comp feat(input): add new textArea comp May 25, 2026
Copy link
Copy Markdown
Contributor

@H4ad H4ad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing textarea.mdx to showcase the component.

Comment thread packages/ui/src/textarea/textarea.forward-ref.test.tsx
Comment thread packages/ui/src/textarea/textarea.module.scss Outdated
Comment thread packages/ui/src/textarea/textarea.tsx Outdated
Comment thread packages/ui/src/textarea/textarea.tsx Outdated
Comment thread apps/docs/stories/textarea.stories.tsx Outdated
Comment thread apps/docs/stories/textarea.stories.tsx Outdated
Comment thread packages/ui/src/input/input.tsx
const resolvedRows = autoSizeOn ? (minRows ?? rows ?? 1) : rows;

return (
<div
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this wrapper? Would make sense to have the className passed to the wrapper, if I want to change the width of this component, I don't want to pass <TextArea rootClassName

Comment on lines +1 to +17
$sizes: (
small: (
padding-y: var(--textarea-size-small-padding-y, var(--spacing-2, 0.25rem)),
font-size: var(--textarea-size-small-font-size, 12px),
),
middle: (
padding-y: var(--textarea-size-middle-padding-y, var(--spacing-4, 0.5rem)),
font-size: var(
--textarea-size-middle-font-size,
var(--input-font-size, var(--periscope-font-size-base, 13px))
),
),
large: (
padding-y: var(--textarea-size-large-padding-y, var(--spacing-6, 0.75rem)),
font-size: var(--textarea-size-large-font-size, 14px),
),
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The result on InputNumber looked good, let's do the same here.

@tewarig tewarig merged commit 5839c36 into feat/add-input-number-comp May 29, 2026
1 check passed
@tewarig tewarig deleted the feat/add-new-textArea-comp branch May 29, 2026 13:46
tewarig added a commit that referenced this pull request May 29, 2026
@tewarig tewarig restored the feat/add-new-textArea-comp branch May 29, 2026 16:27
@tewarig
Copy link
Copy Markdown
Member Author

tewarig commented May 29, 2026

will raise another pr for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants