-
Notifications
You must be signed in to change notification settings - Fork 4.8k
TextArea: add disabled styles #77129
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: trunk
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -62,6 +62,13 @@ export const StyledTextarea = styled.textarea` | |
| ${ inputStyleFocus } | ||
| } | ||
|
|
||
| &:disabled { | ||
| background: ${ COLORS.ui.backgroundDisabled }; | ||
| border-color: ${ COLORS.ui.borderDisabled }; | ||
|
Contributor
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. Do we need to have a way if there are already borders? It seem this var is only used by input control only if is not |
||
| color: ${ COLORS.ui.textDisabled }; | ||
| opacity: 1; | ||
|
Contributor
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. Why do we need the |
||
| } | ||
|
|
||
| // Use opacity to work in various editor styles. | ||
| &::-webkit-input-placeholder { | ||
| color: ${ COLORS.ui.darkGrayPlaceholder }; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,12 @@ export type TextareaControlProps = Pick< | |
| BaseControlProps, | ||
| '__nextHasNoMarginBottom' | 'hideLabelFromVision' | 'help' | 'label' | ||
| > & { | ||
| /** | ||
| * Whether the textarea should be disabled. | ||
| * | ||
| * @default false | ||
| */ | ||
| disabled?: boolean; | ||
|
Comment on lines
+15
to
+20
|
||
| /** | ||
| * A function that receives the new value of the textarea each time it | ||
| * changes. | ||
|
|
||
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.
These git conflict markers were introduced at https://github.com/WordPress/gutenberg/pull/76980/changes#r3050030572. We can just remove them, without making any other changes.