-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Textarea: Adding implementation #22096
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/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
packages/react-textarea/src/components/TextArea/useTextAreaStyles.ts
Outdated
Show resolved
Hide resolved
…eact-textarea-implementation
packages/react-textarea/src/components/TextArea/useTextAreaStyles.ts
Outdated
Show resolved
Hide resolved
height: textAreaHeight.small, | ||
...shorthands.padding( | ||
'0', | ||
`calc(${spacingTokens.horizontal.mNudge} + ${spacingTokens.horizontal.xss})`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miroslavstastny for spacing tokens in theme question
packages/react-textarea/src/stories/TextAreaUncontrolled.stories.tsx
Outdated
Show resolved
Hide resolved
Making a note that TextArea will be renamed to Textarea in a follow-up PR. |
PR Summary
This PR adds the implementation of
Textarea
with its styling completed. Tests, and bundle fixtures will be added in separate PRs.Related Issue(s)