-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tag][Feature] Tags med ikon (#2611)
* 🎉 Tag har nå egen icon-prop * 🎨 Tag.css tilpasset ikoner * 📝 Storybook-demo for tags + ikoner * 📝 Aksel-demo for tag * 📝 Changeset * 🔥 Fjernet iconPosition-prop fra tag.tsx * 🧪 Oppdatert stories med nye props * 🔥 Fjernet iconPosition-demo i Tag fra nettside * 🔥 Fjernet gammel css for iconPosition right tag.tsx
- Loading branch information
Showing
5 changed files
with
100 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@navikt/ds-react": minor | ||
"@navikt/ds-css": minor | ||
--- | ||
|
||
Tag: Har nå innebygd støtte for ikoner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { withDsExample } from "@/web/examples/withDsExample"; | ||
import { ComponentIcon } from "@navikt/aksel-icons"; | ||
import { HStack, Tag } from "@navikt/ds-react"; | ||
|
||
const Example = () => { | ||
return ( | ||
<HStack gap="2" align="start"> | ||
<Tag variant="neutral-moderate" icon={<ComponentIcon aria-hidden />}> | ||
Ikon | ||
</Tag> | ||
<Tag | ||
size="small" | ||
variant="neutral-moderate" | ||
icon={<ComponentIcon aria-hidden />} | ||
> | ||
Ikon | ||
</Tag> | ||
<Tag | ||
size="xsmall" | ||
variant="neutral-moderate" | ||
icon={<ComponentIcon aria-hidden />} | ||
> | ||
Ikon | ||
</Tag> | ||
</HStack> | ||
); | ||
}; | ||
|
||
// EXAMPLES DO NOT INCLUDE CONTENT BELOW THIS LINE | ||
export default withDsExample(Example); | ||
|
||
/* Storybook story */ | ||
export const Demo = { | ||
render: Example, | ||
}; | ||
|
||
export const args = { | ||
index: 5, | ||
desc: "Hvis ikon bare er illustrativt, husk å legge til 'aria-hidden'.", | ||
}; |