Textarea: Adding implementation#22096
Conversation
…eact-textarea-implementation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 6a6dc73:
|
📊 Bundle size report🤖 This report was generated against a8d3d706c64077e7fd9465ab90648d2e0bf8eb82 |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: e6fc4828bde76695a598636a94bc28aac26f3d47 (build) |
packages/react-textarea/src/components/TextArea/useTextAreaStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-textarea/src/components/TextArea/TextArea.types.ts
Outdated
Show resolved
Hide resolved
…eact-textarea-implementation
packages/react-textarea/src/components/TextArea/useTextAreaStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-textarea/src/components/TextArea/useTextAreaStyles.ts
Outdated
Show resolved
Hide resolved
…eact-textarea-implementation
| height: textAreaHeight.small, | ||
| ...shorthands.padding( | ||
| '0', | ||
| `calc(${spacingTokens.horizontal.mNudge} + ${spacingTokens.horizontal.xss})`, |
There was a problem hiding this comment.
Would it make sense to create a token like this:
textAreaHorizontalPadding = {
small: smallspacingTokens.horizontal.mNudge + spacingTokens.horizontal.xss`,
medium: etc.,
large: etc.
}in this file? That way we don't need the browser to run calc for us.
There was a problem hiding this comment.
If the plan is for tokens to ultimately come from react-theme I think we'll need to use calc since those tokens resolve to CSS vars.
There was a problem hiding this comment.
Do you know if there's a plan any time soon to add the spacing tokens to the theme? At least to me it seems like they obviously should be there, but they're not for some reason.
There was a problem hiding this comment.
@miroslavstastny for spacing tokens in theme question
packages/react-textarea/src/stories/TextAreaUncontrolled.stories.tsx
Outdated
Show resolved
Hide resolved
…eact-textarea-implementation
|
Making a note that TextArea will be renamed to Textarea in a follow-up PR. |
PR Summary
This PR adds the implementation of
Textareawith its styling completed. Tests, and bundle fixtures will be added in separate PRs.Related Issue(s)