mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
refactor(overflow-menu): remove formatStyle utility
This commit is contained in:
parent
f249ec094e
commit
3eac5c3a37
2 changed files with 4 additions and 6 deletions
|
@ -64,8 +64,6 @@
|
||||||
import OverflowMenuVertical16 from "carbon-icons-svelte/lib/OverflowMenuVertical16/OverflowMenuVertical16.svelte";
|
import OverflowMenuVertical16 from "carbon-icons-svelte/lib/OverflowMenuVertical16/OverflowMenuVertical16.svelte";
|
||||||
import OverflowMenuHorizontal16 from "carbon-icons-svelte/lib/OverflowMenuHorizontal16/OverflowMenuHorizontal16.svelte";
|
import OverflowMenuHorizontal16 from "carbon-icons-svelte/lib/OverflowMenuHorizontal16/OverflowMenuHorizontal16.svelte";
|
||||||
|
|
||||||
import { formatStyle } from "./formatStyle";
|
|
||||||
|
|
||||||
const ctxBreadcrumbItem = getContext("BreadcrumbItem");
|
const ctxBreadcrumbItem = getContext("BreadcrumbItem");
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
const items = writable([]);
|
const items = writable([]);
|
||||||
|
@ -155,10 +153,11 @@
|
||||||
$: if ($items[$currentIndex]) {
|
$: if ($items[$currentIndex]) {
|
||||||
focusedId.set($items[$currentIndex].id);
|
focusedId.set($items[$currentIndex].id);
|
||||||
}
|
}
|
||||||
$: dynamicPseudoWidth = `#${id} .bx--overflow-menu-options.bx--overflow-menu-options:after {
|
$: styles = `<style>
|
||||||
|
#${id} .bx--overflow-menu-options.bx--overflow-menu-options:after {
|
||||||
width: ${buttonWidth ? buttonWidth + "px" : "2rem"};
|
width: ${buttonWidth ? buttonWidth + "px" : "2rem"};
|
||||||
}`;
|
}
|
||||||
$: styles = formatStyle(dynamicPseudoWidth);
|
<\/style>`;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
export const formatStyle = (style) => ["<style>", style, "</style>"].join("");
|
|
Loading…
Add table
Add a link
Reference in a new issue