Skip to content

Commit

Permalink
fix(action-menu): added labels for control
Browse files Browse the repository at this point in the history
  • Loading branch information
blunteshwar committed Aug 23, 2023
1 parent 44e3588 commit d0f8ae9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/action-menu/src/ActionMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class ActionMenu extends ObserveSlotText(PickerBase, 'label') {
public override selects: undefined | 'single' = undefined;

@property({ type: String, reflect: true })
public static: 'white' | 'black' | 'none' = 'none';
public static: 'white' | 'black' | undefined = undefined;

protected override listRole: 'listbox' | 'menu' = 'menu';
protected override itemRole = 'menuitem';
Expand Down
9 changes: 7 additions & 2 deletions packages/action-menu/stories/action-menu.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ export default {
},
control: {
type: 'select',
labels: {
white: 'white',
black: 'black',
none: undefined,
},
options: ['white', 'black', 'none'],
},
},
Expand All @@ -135,7 +140,7 @@ export default {
quiet: false,
tooltipDescription: '',
tooltipPlacement: 'bottom',
static: 'none',
static: undefined,
},
};

Expand All @@ -147,7 +152,7 @@ interface StoryArgs {
selects?: 'single';
selected?: boolean;
quiet?: boolean;
stati?: 'white' | 'black';
staticValue?: 'white' | 'black' | undefined;
tooltipDescription?: string | 'none';
tooltipPlacement?: string | 'none';
}
Expand Down
2 changes: 1 addition & 1 deletion packages/action-menu/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export const testActionMenu = (mode: 'sync' | 'async'): void => {
it('can be `static`', async () => {
const el = await actionMenuFixture();

expect(el.static == 'none').to.be.true;
expect(el.static == undefined).to.be.true;

el.static = 'black';
await elementUpdated(el);
Expand Down

0 comments on commit d0f8ae9

Please sign in to comment.