Skip to content

Commit

Permalink
SELF-286/disabled menu styles (#490)
Browse files Browse the repository at this point in the history
* Add distinct disabled styles to menu items

* 2.0.49

* update changelog
  • Loading branch information
kencrim authored May 2, 2024
1 parent c9835d5 commit 2c498fd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## v2.0.48

- Add disabled styles for the items of the `Menu` component.

## v2.0.48

- Add new icons for the `Icon` component
- `Details`
- `Previous`
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lob/ui-components",
"version": "2.0.48",
"version": "2.0.49",
"engines": {
"node": ">=20.2.0",
"npm": ">=10.2.0"
Expand Down
3 changes: 2 additions & 1 deletion src/components/Menu/Menu.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ export const Primary: StoryObj<typeof Menu> = {
label: 'Delete',
clickHandler: () => console.log('Deleted'),
key: 'test3',
icon: IconName.DELETE
icon: IconName.DELETE,
disabled: true
}
]
}
Expand Down
10 changes: 9 additions & 1 deletion src/components/Menu/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@
:href="item.item.url"
:target="item.item.target"
>
<span class="uic-menu-item-child">
<span
:class="[
'uic-menu-item-child',
{
'!text-gray-200 !hover:bg-none !cursor-not-allowed':
item.item.disabled
}
]"
>
<Icon
v-if="
item.item.icon &&
Expand Down

0 comments on commit 2c498fd

Please sign in to comment.