Skip to content

Commit

Permalink
fix: is-static flag
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideMininni-Fincons committed Jan 29, 2024
1 parent 4093c56 commit f41647d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/button/button-link/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ The component is internally rendered as a link,
accepting its associated properties (`href`, `target`, `rel` and `download`).

If `isStatic` is set, the component will be rendered as a span 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-link` is placed inside another anchor 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.
Expand Down
1 change: 1 addition & 0 deletions src/components/button/button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The component is internally rendered as a button,
accepting its associated properties (`type`, `name`, `value` and `form`).

If `isStatic` is set, the component will be rendered as a span 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 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.
Expand Down
4 changes: 2 additions & 2 deletions src/components/link/link-button/link-button.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const defaultArgTypes: ArgTypes = {
variant,
negative,
size,
static: isStatic,
'is-static': isStatic,
'icon-name': iconName,
'icon-placement': iconPlacement,
type,
Expand All @@ -173,7 +173,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],
type: type.options[0],
Expand Down
1 change: 1 addition & 0 deletions src/components/link/link-button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The component is internally rendered as a button,
accepting its associated properties (`type`, `name`, `value` and `form`).

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-link-button` is placed inside another button tag,
it is internally rendered as a span in order to not break HTML functionality.

Expand Down
4 changes: 2 additions & 2 deletions src/components/link/link/link.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const defaultArgTypes: ArgTypes = {
variant,
negative,
size,
static: isStatic,
'is-static': isStatic,
'icon-name': iconName,
'icon-placement': iconPlacement,
href,
Expand All @@ -178,7 +178,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],
Expand Down
1 change: 1 addition & 0 deletions src/components/link/link/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The component is internally rendered as a link,
accepting its associated properties (`href`, `target`, `rel` and `download`).

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 `href` is not provider or `sbb-link` is placed inside another anchor tag,
it is internally rendered as a span in order to not break HTML functionality.

Expand Down

0 comments on commit f41647d

Please sign in to comment.