Skip to content

Commit

Permalink
fix(doc): update link example
Browse files Browse the repository at this point in the history
  • Loading branch information
dpellier committed Jul 29, 2024
1 parent 707ec78 commit 1cd1fbf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
$current: &;

@include ods-link;

&:not(&#{$current}--disabled) {
&#{$current}--primary {
color: var(--ods-color-primary-500);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as LinkStories from './link.stories';

Has been removed.

Icons are now font, they will by default have the same color as the current text. (TODO will be true after font update only)
You can use the style customization to achieve the same result, until a new color get validated by the design team.

`slot ` <img src="https://img.shields.io/badge/removed-FF0000" />

Expand All @@ -23,26 +23,22 @@ You can use the new attributes `label` and `icon` to achieve that.

## Migration examples

Contrasted link:
You can use the `color` attribute with the value `contrasted` to obtain the same rendering.
```html
<ods-link href="/page" contrasted></ods-link>
<!-- is now -->
<ods-link href="/page" color="contrasted"></ods-link>
```

Label link:
```html
<ods-link href="/page">Content</ods-link>
<osds-link href="/page">Content</osds-link>

<!-- is now -->

<ods-link href="/page" label="Content"></ods-link>
```

Icon link:
```html
<ods-link href="/page">
<ods-icon name="warning" size="xs">
</ods-link>
<osds-link href="/page">
<osds-icon name="warning" size="xs"></osds-icon>
</osds-link>

<!-- is now -->

<ods-link href="/page" icon="warning"></ods-link>
```

0 comments on commit 1cd1fbf

Please sign in to comment.