mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat(overflow-menu): support "sm", "xl" size variants
This commit is contained in:
parent
1300104661
commit
b4caea5f62
7 changed files with 108 additions and 57 deletions
|
@ -4,6 +4,7 @@ components: ["OverflowMenu", "OverflowMenuItem"]
|
|||
|
||||
<script>
|
||||
import { OverflowMenu, OverflowMenuItem } from "carbon-components-svelte";
|
||||
import Add16 from "carbon-icons-svelte/lib/Add16";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
|
@ -31,6 +32,22 @@ components: ["OverflowMenu", "OverflowMenuItem"]
|
|||
<OverflowMenuItem danger text="Delete service" />
|
||||
</OverflowMenu>
|
||||
|
||||
### Extra-large size
|
||||
|
||||
<OverflowMenu size="xl">
|
||||
<OverflowMenuItem text="Manage credentials" />
|
||||
<OverflowMenuItem href="https://cloud.ibm.com/docs/api-gateway/" text="API documentation" />
|
||||
<OverflowMenuItem danger text="Delete service" />
|
||||
</OverflowMenu>
|
||||
|
||||
### Small size
|
||||
|
||||
<OverflowMenu size="sm">
|
||||
<OverflowMenuItem text="Manage credentials" />
|
||||
<OverflowMenuItem href="https://cloud.ibm.com/docs/api-gateway/" text="API documentation" />
|
||||
<OverflowMenuItem danger text="Delete service" />
|
||||
</OverflowMenu>
|
||||
|
||||
### Custom primary focus
|
||||
|
||||
By default, the first overflow menu item is focused when opening the dropdown.
|
||||
|
@ -41,6 +58,14 @@ By default, the first overflow menu item is focused when opening the dropdown.
|
|||
<OverflowMenuItem primaryFocus danger text="Delete service" />
|
||||
</OverflowMenu>
|
||||
|
||||
### Custom trigger icon
|
||||
|
||||
<OverflowMenu icon={Add16}>
|
||||
<OverflowMenuItem text="Manage credentials" />
|
||||
<OverflowMenuItem href="https://cloud.ibm.com/docs/api-gateway/" text="API documentation" />
|
||||
<OverflowMenuItem danger text="Delete service" />
|
||||
</OverflowMenu>
|
||||
|
||||
### Custom trigger slot
|
||||
|
||||
<OverflowMenu style="width: auto;">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue