-
How should i use OverflowMenuItem with an icon? |
Beta Was this translation helpful? Give feedback.
Answered by
metonym
Jul 8, 2022
Replies: 1 comment 1 reply
-
https://svelte.dev/repl/979d3e0c1e8d4703b80cc33166cd6783?version=3.49.0 <script>
import { OverflowMenu, OverflowMenuItem } from "carbon-components-svelte";
import TrashCan from "carbon-icons-svelte/lib/TrashCan.svelte";
</script>
<OverflowMenu>
<OverflowMenuItem>
<div>
<TrashCan /> Text
</div>
</OverflowMenuItem>
</OverflowMenu>
<style>
div {
display: flex;
align-items: center;
}
:global(div *) {
margin-right: 0.375rem;
}
</style> |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
dankobg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://svelte.dev/repl/979d3e0c1e8d4703b80cc33166cd6783?version=3.49.0