mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
feat(Tabs): add light variant
This commit is contained in:
parent
2a63aa7729
commit
d1e02f8c28
2 changed files with 12 additions and 1 deletions
|
@ -13,7 +13,7 @@ export const Default = () => ({
|
|||
tabindex: text("Tab index (tabindex in <Tab>)", "0"),
|
||||
},
|
||||
tabsProps: {
|
||||
className: "some-class",
|
||||
class: "some-class",
|
||||
selected: number("The index of the selected tab (selected in <Tabs>)", 1),
|
||||
triggerHref: text(
|
||||
"The href of trigger button for narrow mode (triggerHref in <Tabs>)",
|
||||
|
@ -28,6 +28,10 @@ export const Default = () => ({
|
|||
"The className for the child `<TabContent>` components",
|
||||
"tab-content"
|
||||
),
|
||||
light: boolean(
|
||||
"Specify whether or not to use the light component variant",
|
||||
false
|
||||
),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -23,6 +23,12 @@
|
|||
*/
|
||||
export let triggerHref = "#";
|
||||
|
||||
/**
|
||||
* Specify whether or not to use the light component variant
|
||||
* @type {boolean} [light=false]
|
||||
*/
|
||||
export let light = false;
|
||||
|
||||
import { createEventDispatcher, afterUpdate, setContext } from "svelte";
|
||||
import { writable, derived } from "svelte/store";
|
||||
import ChevronDownGlyph from "carbon-icons-svelte/lib/ChevronDownGlyph";
|
||||
|
@ -111,6 +117,7 @@
|
|||
role="navigation"
|
||||
class:bx--tabs="{true}"
|
||||
class:bx--tabs--container="{type === 'container'}"
|
||||
class:bx--tabs--light="{light}"
|
||||
{...$$restProps}
|
||||
>
|
||||
<div
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue