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
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feat: Adding filled with shadow appearance.",
"packageName": "@fluentui/react-textarea",
"email": "esteban.230@hotmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const textareaClassNames: SlotClassNames<TextareaSlots>;

// @public
export type TextareaProps = Omit<ComponentProps<Partial<TextareaSlots>, 'textarea'>, 'defaultValue' | 'onChange' | 'size' | 'value'> & {
appearance?: 'outline' | 'filled-darker' | 'filled-lighter';
appearance?: 'outline' | 'filled-darker' | 'filled-lighter' | 'filled-darker-shadow' | 'filled-lighter-shadow';
defaultValue?: string;
onChange?: (ev: React_2.ChangeEvent<HTMLTextAreaElement>, data: TextareaOnChangeData) => void;
resize?: 'none' | 'horizontal' | 'vertical' | 'both';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type TextareaProps = Omit<
*
* @default outline
*/
appearance?: 'outline' | 'filled-darker' | 'filled-lighter';
appearance?: 'outline' | 'filled-darker' | 'filled-lighter' | 'filled-darker-shadow' | 'filled-lighter-shadow';
Comment thread
sopranopillow marked this conversation as resolved.

/**
* The default value of the Textarea.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,18 @@ const useRootStyles = makeStyles({
backgroundColor: tokens.colorNeutralBackground1,
},

'filled-darker-shadow': {
backgroundColor: tokens.colorNeutralBackground3,
...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStrokeInteractive),
boxShadow: tokens.shadow2,
},

'filled-lighter-shadow': {
backgroundColor: tokens.colorNeutralBackground1,
...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStrokeInteractive),
boxShadow: tokens.shadow2,
},

outline: {
backgroundColor: tokens.colorNeutralBackground1,
...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ const useStyles = makeStyles({
export const Appearance = () => {
const outlineId = useId('textarea-outline');
const filledDarkerId = useId('textarea-filleddarker');
const filledDarkerShadowId = useId('textarea-filleddarkershadow');
const filledLighterId = useId('textarea-filledlighter');
const filledLighterShadowId = useId('textarea-filledlightershadow');
const styles = useStyles();

return (
Expand All @@ -54,6 +56,26 @@ export const Appearance = () => {
<Label htmlFor={filledLighterId}>Textarea with Filled Lighter appearance.</Label>
<Textarea id={filledLighterId} appearance="filled-lighter" placeholder="type here..." resize="both" />
</div>

<div className={styles.filledDarker}>
Comment thread
sopranopillow marked this conversation as resolved.
<Label htmlFor={filledDarkerShadowId}>Textarea with Filled Darker with shadow appearance.</Label>
<Textarea
id={filledDarkerShadowId}
appearance="filled-darker-shadow"
placeholder="type here..."
resize="both"
/>
</div>

<div className={styles.filledLighter}>
<Label htmlFor={filledLighterShadowId}>Textarea with Filled Lighter with shadow appearance.</Label>
<Textarea
id={filledLighterShadowId}
appearance="filled-lighter-shadow"
placeholder="type here..."
resize="both"
/>
</div>
</div>
);
};
Expand Down