diff --git a/packages/web-components/fast-components/src/listbox/listbox.definition.ts b/packages/web-components/fast-components/src/listbox/listbox.definition.ts index 11f998b6a77..89827dc59ae 100644 --- a/packages/web-components/fast-components/src/listbox/listbox.definition.ts +++ b/packages/web-components/fast-components/src/listbox/listbox.definition.ts @@ -15,6 +15,7 @@ export const fastListboxDefinition: WebComponentDefinition = { type: DataType.string, default: ListboxRole.listbox, required: true, + values: Object.keys(ListboxRole).map(e => ({ name: `${e}` })), }, { name: "disabled", diff --git a/packages/web-components/fast-components/src/listbox/scenarios/index.html b/packages/web-components/fast-components/src/listbox/scenarios/index.html new file mode 100644 index 00000000000..ee262eaafcb --- /dev/null +++ b/packages/web-components/fast-components/src/listbox/scenarios/index.html @@ -0,0 +1,7 @@ + diff --git a/sites/fast-component-explorer/app/fast-components/configs/fast-listbox.ts b/sites/fast-component-explorer/app/fast-components/configs/fast-listbox.ts new file mode 100644 index 00000000000..cb81bef8322 --- /dev/null +++ b/sites/fast-component-explorer/app/fast-components/configs/fast-listbox.ts @@ -0,0 +1,20 @@ +import { + fastComponentDefinitions, + fastComponentSchemas, +} from "@microsoft/site-utilities"; +import { camelCase } from "lodash-es"; +import Guidance from "../../.tmp/listbox/guidance"; +import Scenarios from "../../.tmp/listbox/scenario"; +import { mapScenarios } from "../utilities/mapping"; +import { ComponentViewConfig } from "./data.props"; + +export const fastOptionId = "fast-option"; +export const fastListboxId = "fast-listbox"; +const fastListboxConfig: ComponentViewConfig = { + schema: fastComponentSchemas[fastListboxId], + definition: fastComponentDefinitions[`${camelCase(fastListboxId)}Definition`], + guidance: Guidance, + scenarios: mapScenarios(Scenarios), +}; + +export default fastListboxConfig; diff --git a/sites/fast-component-explorer/app/fast-components/configs/index.ts b/sites/fast-component-explorer/app/fast-components/configs/index.ts index 7bab1e6eeda..3d327acfc1c 100644 --- a/sites/fast-component-explorer/app/fast-components/configs/index.ts +++ b/sites/fast-component-explorer/app/fast-components/configs/index.ts @@ -28,6 +28,9 @@ export { fastDividerConfig }; import fastFlipperConfig from "./fast-flipper"; export { fastFlipperConfig }; +import fastListboxConfig from "./fast-listbox"; +export { fastListboxConfig }; + import fastMenuConfig from "./fast-menu"; export { fastMenuConfig };