-
Notifications
You must be signed in to change notification settings - Fork 625
Remove styled-system usage - TextInputWrapper and related #6666
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
base: main
Are you sure you want to change the base?
Changes from all commits
5d76f0b
3356187
55947fe
cabae97
bb312d5
5934861
231a177
1e677a6
5d28459
741e430
15248ef
d364402
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/react': major | ||
--- | ||
|
||
Removes styled-system usage from TextInputWrapper and related components and Storybook stories. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.MemexOverlayIssueTitleInput { | ||
padding-block: var(--base-size-2); | ||
padding-inline: var(--base-size-8); | ||
text-align: left; | ||
color: var(--fgColor-default); | ||
} | ||
|
||
.MemexOverlayIssueTitleInput input { | ||
font-weight: var(--base-text-weight-semibold); | ||
font-size: var(--text-title-size-medium); | ||
padding-inline: 0; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ import type {TextareaHTMLAttributes, ReactElement} from 'react' | |
import React from 'react' | ||
import {TextInputBaseWrapper} from '../internal/components/TextInputWrapper' | ||
import type {FormValidationStatus} from '../utils/types/FormValidationStatus' | ||
import type {SxProp} from '../sx' | ||
import classes from './TextArea.module.css' | ||
|
||
export const DEFAULT_TEXTAREA_ROWS = 7 | ||
|
@@ -46,8 +45,7 @@ export type TextareaProps = { | |
* CSS styles to apply to the Textarea | ||
*/ | ||
style?: React.CSSProperties | ||
} & TextareaHTMLAttributes<HTMLTextAreaElement> & | ||
SxProp | ||
} & TextareaHTMLAttributes<HTMLTextAreaElement> | ||
|
||
/** | ||
* An accessible, native textarea component that supports validation states. | ||
|
@@ -58,7 +56,6 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>( | |
{ | ||
value, | ||
disabled, | ||
sx: sxProp, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see usage of this in dotcom, are we planning to migrate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume we would, but we're also planning to get rid of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah yes I think react-styled is the way to go here. @joshblack would it be part of https://github.com/github/primer/issues/5422 as well to go in dotcom and replace the textarea + sx usage with react-styled instead or what's the pipeline here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exactly, yeah. I would make sure in github-ui to update usage there first (the migration in this case is just find the places that use styled-system for these components and update the imports to pull the component from Hope that makes sense, let me know if it'd be helpful to walk through this or do a loom or something since this is a new process 👀 |
||
required, | ||
validationStatus, | ||
rows = DEFAULT_TEXTAREA_ROWS, | ||
|
@@ -76,7 +73,6 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>( | |
): ReactElement => { | ||
return ( | ||
<TextInputBaseWrapper | ||
sx={sxProp} | ||
validationStatus={validationStatus} | ||
disabled={disabled} | ||
block={block} | ||
|
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.
Can you convert the color here?