mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 03:01:25 +00:00
fix(progress-step): inherit unclickable styling if preventChangeOnClick
is true
(#1535)
Fixes #1534
This commit is contained in:
parent
bf337c48ae
commit
7a98ec26eb
2 changed files with 7 additions and 2 deletions
|
@ -31,7 +31,8 @@
|
|||
|
||||
let step = {};
|
||||
|
||||
const { stepsById, add, change } = getContext("ProgressIndicator");
|
||||
const { stepsById, add, change, preventChangeOnClick } =
|
||||
getContext("ProgressIndicator");
|
||||
|
||||
$: add({ id, complete, disabled });
|
||||
|
||||
|
@ -67,7 +68,8 @@
|
|||
aria-disabled="{disabled}"
|
||||
tabindex="{!current && !disabled ? '0' : '-1'}"
|
||||
class:bx--progress-step-button="{true}"
|
||||
class:bx--progress-step-button--unclickable="{current}"
|
||||
class:bx--progress-step-button--unclickable="{current ||
|
||||
$preventChangeOnClick}"
|
||||
on:click
|
||||
on:click="{() => {
|
||||
if (!step.complete) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue