mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
chore: lift components folder
This commit is contained in:
parent
76df51674d
commit
2200b29b92
301 changed files with 57 additions and 76 deletions
|
@ -1,22 +0,0 @@
|
|||
<script>
|
||||
export const translationIds = { close: "close", open: "open" };
|
||||
export let open = false;
|
||||
export let translateWithId = id => defaultTranslations[id];
|
||||
|
||||
import ChevronDown16 from "carbon-icons-svelte/lib/ChevronDown16";
|
||||
|
||||
const defaultTranslations = {
|
||||
[translationIds.close]: "Close menu",
|
||||
[translationIds.open]: "Open menu"
|
||||
};
|
||||
|
||||
$: description = open ? translateWithId("close") : translateWithId("open");
|
||||
</script>
|
||||
|
||||
<div
|
||||
class:bx--list-box__menu-icon={true}
|
||||
class:bx--list-box__menu-icon--open={open}
|
||||
{...$$restProps}
|
||||
on:click|preventDefault|stopPropagation>
|
||||
<ChevronDown16 aria-label={description} title={description} />
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue