Skip to content

Commit

Permalink
fix(iconbutton): update demos to fix a11y
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 561168744
  • Loading branch information
asyncLiz authored and copybara-github committed Aug 29, 2023
1 parent 541c0e9 commit a9091fe
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 273 deletions.
19 changes: 2 additions & 17 deletions iconbutton/demo/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,15 @@ import './index.js';
import './material-collection.js';

import {KnobTypesToKnobs, MaterialCollection, materialInitsToStoryInits, setUpDemo} from './material-collection.js';
import {boolInput, Knob, radioSelector, textInput} from './index.js';
import {boolInput, Knob, textInput} from './index.js';

import {stories, StoryKnobs} from './stories.js';

const collection =
new MaterialCollection<KnobTypesToKnobs<StoryKnobs>>('Icon Button', [
new Knob('icon', {ui: textInput(), defaultValue: 'check'}),
new Knob('ariaLabel', {ui: textInput(), defaultValue: ''}),
new Knob(
'href', {ui: textInput(), defaultValue: 'https://www.google.com'}),
new Knob<'_blank'|'_self', 'target'>('target', {
ui: radioSelector({
options: [
{value: '_blank', label: '_blank'}, {value: '_self', label: '_self'}
],
name: 'target'
}),
defaultValue: '_blank'
}),
new Knob('selectedIcon', {ui: textInput(), defaultValue: 'star'}),
new Knob('ariaLabelSelected', {ui: textInput(), defaultValue: ''}),
new Knob('selected', {ui: boolInput(), defaultValue: false}),
new Knob('selectedIcon', {ui: textInput(), defaultValue: 'close'}),
new Knob('disabled', {ui: boolInput(), defaultValue: false}),
new Knob('flipIconInRtl', {ui: boolInput(), defaultValue: false}),
]);

collection.addStories(...materialInitsToStoryInits(stories));
Expand Down
Loading

0 comments on commit a9091fe

Please sign in to comment.