diff --git a/change/@fluentui-react-textarea-a60f7be9-9011-4b41-81f6-b700be755b8e.json b/change/@fluentui-react-textarea-a60f7be9-9011-4b41-81f6-b700be755b8e.json new file mode 100644 index 0000000000000..23bcc3b52449b --- /dev/null +++ b/change/@fluentui-react-textarea-a60f7be9-9011-4b41-81f6-b700be755b8e.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: Change filled appearances' normal state's token.", + "packageName": "@fluentui/react-textarea", + "email": "esteban.230@hotmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-textarea/src/components/Textarea/useTextareaStyles.ts b/packages/react-components/react-textarea/src/components/Textarea/useTextareaStyles.ts index 3b341e7de1eb0..039920dfbdf66 100644 --- a/packages/react-components/react-textarea/src/components/Textarea/useTextareaStyles.ts +++ b/packages/react-components/react-textarea/src/components/Textarea/useTextareaStyles.ts @@ -102,14 +102,17 @@ const useRootStyles = makeStyles({ }, }, + filled: { + ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStroke), + ':hover,:focus-within': { + ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive), + }, + }, 'filled-darker': { backgroundColor: tokens.colorNeutralBackground3, - ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStrokeInteractive), }, - 'filled-lighter': { backgroundColor: tokens.colorNeutralBackground1, - ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStrokeInteractive), }, outline: { @@ -217,14 +220,16 @@ const useTextareaResizeStyles = makeStyles({ * Apply styling to the Textarea slots based on the state */ export const useTextareaStyles_unstable = (state: TextareaState): TextareaState => { - const disabled = state.textarea.disabled; const { size, appearance, resize } = state; + const disabled = state.textarea.disabled; + const filled = appearance.startsWith('filled'); const rootStyles = useRootStyles(); state.root.className = mergeClasses( textareaClassNames.root, rootStyles.base, rootStyles[appearance], + filled && rootStyles.filled, disabled && rootStyles.disabled, !disabled && rootStyles.interactive, !disabled && appearance === 'outline' && rootStyles.outlineInteractive,