mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat(progress-indicator): add spaceEqual prop and functionality
This commit is contained in:
parent
767e113e27
commit
d57531fc01
2 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,7 @@ export const Default = () => ({
|
||||||
props: {
|
props: {
|
||||||
currentIndex: number("Current progress (currentIndex)", 1),
|
currentIndex: number("Current progress (currentIndex)", 1),
|
||||||
vertical: boolean("Vertical orientation (vertical)", false),
|
vertical: boolean("Vertical orientation (vertical)", false),
|
||||||
|
spaceEqually: boolean("Space Equally", false),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,12 @@
|
||||||
*/
|
*/
|
||||||
export let vertical = false;
|
export let vertical = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to `true` to specify whether the progress steps should be split equally in size in the div
|
||||||
|
* @type {boolean} [spaceEqually=false]
|
||||||
|
*/
|
||||||
|
export let spaceEqually = false;
|
||||||
|
|
||||||
import { createEventDispatcher, setContext } from "svelte";
|
import { createEventDispatcher, setContext } from "svelte";
|
||||||
import { writable, derived } from "svelte/store";
|
import { writable, derived } from "svelte/store";
|
||||||
|
|
||||||
|
@ -43,6 +49,7 @@
|
||||||
<ul
|
<ul
|
||||||
class:bx--progress="{true}"
|
class:bx--progress="{true}"
|
||||||
class:bx--progress--vertical="{vertical}"
|
class:bx--progress--vertical="{vertical}"
|
||||||
|
class:bx--progress--space-equal="{spaceEqually && !vertical}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
on:mouseover
|
on:mouseover
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue