diff --git a/src/components/button/button.stories.ts b/src/components/button/button.stories.ts index 6ec522ee48..7662479130 100644 --- a/src/components/button/button.stories.ts +++ b/src/components/button/button.stories.ts @@ -240,7 +240,7 @@ const defaultArgTypes: ArgTypes = { variant, negative, size, - static: isStatic, + 'is-static': isStatic, 'icon-name': iconName, href, target, @@ -259,7 +259,7 @@ const defaultArgs: Args = { variant: variant.options[0], negative: false, size: size.options[0], - static: false, + 'is-static': false, 'icon-name': 'arrow-right-small', href: undefined, target: undefined, diff --git a/src/components/button/readme.md b/src/components/button/readme.md index d55793357e..7f1a4ad9ff 100644 --- a/src/components/button/readme.md +++ b/src/components/button/readme.md @@ -28,6 +28,7 @@ depending on the value of the `href` property, so the associated properties are (`href`, `target`, `rel` and `download` for link; `type`, `name`, `value` and `form` for button). If `isStatic` is set, the component will be rendered as a button without any user interaction. +The `isStatic` is only considered during initial rendering (connectedCallback), later configuration changes are ignored. Please note that if the `sbb-button` is placed inside another anchor or button tag, it is internally rendered as a span in order to not break HTML functionality. If the component is placed inside an `sbb-form-field`, it renders with the correct styling. diff --git a/src/components/link/link.stories.ts b/src/components/link/link.stories.ts index 10e425a356..b8f5e5ee0d 100644 --- a/src/components/link/link.stories.ts +++ b/src/components/link/link.stories.ts @@ -199,7 +199,7 @@ const defaultArgTypes: ArgTypes = { variant, negative, size, - static: isStatic, + 'is-static': isStatic, 'icon-name': iconName, 'icon-placement': iconPlacement, href, @@ -219,7 +219,7 @@ const defaultArgs: Args = { variant: variant.options[0], negative: false, size: size.options[1], - static: false, + 'is-static': false, 'icon-name': undefined, 'icon-placement': iconPlacement.options[0], href: href.options[1], diff --git a/src/components/link/readme.md b/src/components/link/readme.md index 3208646751..526740b650 100644 --- a/src/components/link/readme.md +++ b/src/components/link/readme.md @@ -28,6 +28,7 @@ The component can be internally rendered as a button or as a link, depending on the value of the `href` property, so the associated properties are available (`href`, `target`, `rel` and `download` for link; `type`, `name`, `value` and `form` for button). If `isStatic` is set, the component will be rendered as a link without any user interaction. +The `isStatic` is only considered during initial rendering (connectedCallback), later configuration changes are ignored. Please note that if the `sbb-link` is placed inside another anchor or button tag, it is internally rendered as a span in order to not break HTML functionality.