Skip to content
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

fix: add full width to controls for text-field and text-area, add examples #14492

Merged
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,8 @@
{
"type": "patch",
"comment": "fix: add full width to text-area and text-field controls to expand properly with component",
"packageName": "@fluentui/web-components",
"email": "sethdonohue@Admins-MBP.guest.corp.microsoft.com",
"dependentChangeType": "patch",
"date": "2020-08-12T18:41:04.074Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ <h4>Default</h4>
<span>label</span>
</fluent-text-area>

<h4>Full Width</h4>
<fluent-text-area style="width: 100%;"></fluent-text-area>

<h4>Placeholder</h4>
<fluent-text-area placeholder="Placeholder"></fluent-text-area>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FluentTextArea;
FluentDesignSystemProvider;

export default {
title: 'Text area',
title: 'Text Area',
};

export const TextArea = (): string => Examples;
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const TextAreaStyles = css`
font-size: var(--type-ramp-base-font-size);
line-height: var(--type-ramp-base-line-height);
padding: calc(var(--design-unit) * 1.5px) calc(var(--design-unit) * 2px + 1px);
max-width: 100%;
width: 100%;
resize: none;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ <h4>Default</h4>
<fluent-text-field></fluent-text-field>
<fluent-text-field>Label</fluent-text-field>

<h4>Full Width</h4>
<fluent-text-field style="width: 100%;"></fluent-text-field>

<h4>Placeholder</h4>
<fluent-text-field placeholder="Placeholder"></fluent-text-field>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const TextFieldStyles = css`
background: transparent;
border: 0;
height: calc(100% - 4px);
width: 100%;
margin-top: auto;
margin-bottom: auto;
border: none;
Expand Down