Skip to content

Commit

Permalink
removed adult themes from fixture, used orientation enum from web-uti…
Browse files Browse the repository at this point in the history
…lities
  • Loading branch information
marjonlynch committed May 11, 2020
1 parent 4b4c5fa commit 3ca42e5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ <h4>Defaults</h4>
</div>

<div>
<fast-radio-group orientation="vertical" name="Bourbon">
<label slot="label">Bourbon</label>
<fast-radio value="elijahcraig">Elijah Craig</fast-radio>
<fast-radio value="woodford">Woodford Reserve</fast-radio>
<fast-radio value="elmerlee">Elmer T Lee</fast-radio>
<fast-radio-group orientation="vertical" name="trees">
<label slot="label">Trees</label>
<fast-radio value="fir">Fir</fast-radio>
<fast-radio value="juniper">Juniper</fast-radio>
<fast-radio value="hemlock">Hemlock</fast-radio>
<fast-radio value="pine">Pine</fast-radio>
</fast-radio-group>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { html, slotted } from "@microsoft/fast-element";
import { RadioGroup, RadioOrientation } from "./radio-group";
import { Orientation } from "@microsoft/fast-web-utilities";
import { RadioGroup } from "./radio-group";

export const RadioGroupTemplate = html<RadioGroup>`
<template
Expand All @@ -10,9 +11,7 @@ export const RadioGroupTemplate = html<RadioGroup>`
<slot name="label"></slot>
<div
class="positioning-region ${x =>
x.orientation === RadioOrientation.horizontal
? "horizontal"
: "vertical"}"
x.orientation === Orientation.horizontal ? "horizontal" : "vertical"}"
part="positioning-region"
>
<slot ${slotted("slottedRadioButtons")}> </slot>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { attr, FASTElement, observable } from "@microsoft/fast-element";
import { Orientation } from "@microsoft/fast-web-utilities";
import {
keyCodeArrowDown,
keyCodeArrowLeft,
Expand All @@ -8,11 +9,6 @@ import {
} from "@microsoft/fast-web-utilities";
import { RadioControl } from "../radio";

export enum RadioOrientation {
horizontal = "horizontal",
vertical = "vertical",
}

export class RadioGroup extends FASTElement {
@attr({ attribute: "readonly", mode: "boolean" })
public readOnly: boolean;
Expand Down Expand Up @@ -56,7 +52,7 @@ export class RadioGroup extends FASTElement {
public value: string;

@attr
public orientation: RadioOrientation = RadioOrientation.horizontal;
public orientation: Orientation = Orientation.horizontal;

@observable slottedRadioButtons: RadioControl[];
private selectedRadio: RadioControl | null;
Expand Down

0 comments on commit 3ca42e5

Please sign in to comment.