Merge pull request #263 from josefaidt/261-add-spaceequal-progress-indicator

feat(progress-indicator): add spaceEqual prop and functionality
This commit is contained in:
Eric Liu 2020-09-18 16:52:27 -07:00 committed by GitHub
commit 0037e7546c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -8,6 +8,7 @@ export const Default = () => ({
props: {
currentIndex: number("Current progress (currentIndex)", 1),
vertical: boolean("Vertical orientation (vertical)", false),
spaceEqually: boolean("Space Equally", false),
},
});

View file

@ -11,6 +11,12 @@
*/
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 { writable, derived } from "svelte/store";
@ -43,6 +49,7 @@
<ul
class:bx--progress="{true}"
class:bx--progress--vertical="{vertical}"
class:bx--progress--space-equal="{spaceEqually && !vertical}"
{...$$restProps}
on:click
on:mouseover