Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ storiesOf('Textarea Converged', module)
<Textarea aria-invalid appearance="filled-lighter" placeholder="Placeholder" />
</div>
))
.addStory('Disabled', () => <Textarea disabled />)
.addStory('With value', () => <Textarea defaultValue="Value" />);

// Non interactive
Expand All @@ -49,6 +48,11 @@ storiesOf('Textarea Converged', module)
.addStory('Size: small', () => <Textarea size="small" placeholder="Placeholder" />)
.addStory('Size: medium', () => <Textarea size="medium" placeholder="Placeholder" />)
.addStory('Size: large', () => <Textarea size="large" placeholder="Placeholder" />)
.addStory('Disabled', () => <Textarea defaultValue="Example Textarea value" disabled />)
.addStory('Disabled + placeholder', () => <Textarea placeholder="Example Textarea placeholder" disabled />)
.addStory('Disabled + filled', () => (
<Textarea appearance="filled-darker" defaultValue="Example Textarea value" disabled />
))
.addStory('With appearance override', () => (
<FluentProvider overrides_unstable={{ inputDefaultAppearance: 'filled-darker' }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px' }}>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: When Textarea is disabled, make the text gray and add an outline for the filled appearance.",
"packageName": "@fluentui/react-textarea",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const useRootStyles = makeStyles({
backgroundColor: tokens.colorTransparentBackground,
...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeDisabled),
[`& > textarea`]: {
color: tokens.colorNeutralForegroundDisabled,
cursor: 'not-allowed',
'::placeholder': {
color: tokens.colorNeutralForegroundDisabled,
Expand Down Expand Up @@ -244,9 +245,9 @@ export const useTextareaStyles_unstable = (state: TextareaState): TextareaState
state.root.className = mergeClasses(
textareaClassNames.root,
rootStyles.base,
rootStyles[appearance],
filled && rootStyles.filled,
disabled && rootStyles.disabled,
!disabled && filled && rootStyles.filled,
!disabled && rootStyles[appearance],
!disabled && rootStyles.interactive,
!disabled && appearance === 'outline' && rootStyles.outlineInteractive,
!disabled && invalid && rootStyles.invalid,
Expand Down