Skip to content

Commit

Permalink
Fix web component radio group orientation (microsoft#15953)
Browse files Browse the repository at this point in the history
* fix: radio group orientation vertical broken

* Change files
  • Loading branch information
eljefe223 authored and Seth Donohue committed Nov 23, 2020
1 parent 009e066 commit fbdceb4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
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
8 changes: 8 additions & 0 deletions packages/web-components/src/radio-group/radio-group.styles.ts
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;
}
`;

0 comments on commit fbdceb4

Please sign in to comment.