material-web/iconbutton/demo/demo.ts
Elizabeth Mitchell 5f93c82546 chore(iconbutton): add distinctly labelled examples for a11y
PiperOrigin-RevId: 602853997
2024-01-30 15:11:45 -08:00

32 lines
791 B
TypeScript

/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import './material-collection.js';
import './index.js';
import {
KnobTypesToKnobs,
MaterialCollection,
materialInitsToStoryInits,
setUpDemo,
} from './material-collection.js';
import {boolInput, Knob, textInput} from './index.js';
import {stories, StoryKnobs} from './stories.js';
const collection = new MaterialCollection<KnobTypesToKnobs<StoryKnobs>>(
'Icon Button',
[
new Knob('disabled', {ui: boolInput(), defaultValue: false}),
new Knob('icon', {ui: textInput(), defaultValue: ''}),
new Knob('selectedIcon', {ui: textInput(), defaultValue: ''}),
],
);
collection.addStories(...materialInitsToStoryInits(stories));
setUpDemo(collection, {icons: 'material-symbols'});