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 web component radio group orientation #15953

Merged
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minor",
"comment": "fix: radio group orientation vertical broken",
"packageName": "@fluentui/web-components",
"email": "jes@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-11-16T21:06:32.783Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h4>Single radio</h4>
<h4>With label outside group</h4>
<div style="display: flex; flex-direction: column; margin-top: 12px;">
<label id="label1">Outside label</label>
<fluent-radio-group required="true" aria-labelledby="label1" name="fruits">
<fluent-radio-group required="true" aria-labelledby="label1" name="fruits" orientation="vertical">
<fluent-radio value="apples">Apples</fluent-radio>
<fluent-radio value="oranges">Oranges</fluent-radio>
<fluent-radio value="bananas">Bananas</fluent-radio>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@ export const RadioGroupStyles = css`
display: flex;
flex-wrap: wrap;
}

:host([orientation='vertical']) .positioning-region {
flex-direction: column;
}

:host([orientation='horizontal']) .positioning-region {
flex-direction: row;
}
`;