material-web/button/demo/demo.ts
Elizabeth Mitchell c390291687 chore: format files with prettier
PiperOrigin-RevId: 576601342
2023-10-25 11:59:00 -07:00

31 lines
737 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>>(
'Button',
[
new Knob('label', {ui: textInput(), defaultValue: ''}),
new Knob('disabled', {ui: boolInput(), defaultValue: false}),
],
);
collection.addStories(...materialInitsToStoryInits(stories));
setUpDemo(collection, {fonts: 'roboto', icons: 'material-symbols'});