feat(SW-375): new tokens
new asset generation logic BREAKING CHANGE: New tokens.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react'
|
||||
|
||||
import { ChipLink } from './ChipLink.tsx'
|
||||
import ChevronRightSmallIcon from '../Icons/ChevronRightSmall.tsx'
|
||||
|
||||
const meta: Meta<typeof ChipLink> = {
|
||||
title: 'Components/Chip/ChipLInk 🚧',
|
||||
component: ChipLink,
|
||||
}
|
||||
|
||||
export default meta
|
||||
|
||||
type Story = StoryObj<typeof ChipLink>
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
href: '/',
|
||||
onClick: (e) => e.preventDefault(),
|
||||
children: (
|
||||
<>
|
||||
Link Chip <ChevronRightSmallIcon width={20} height={20} />
|
||||
</>
|
||||
),
|
||||
},
|
||||
}
|
||||
19
packages/design-system/lib/components/ChipLink/ChipLink.tsx
Normal file
19
packages/design-system/lib/components/ChipLink/ChipLink.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Typography } from '../Typography'
|
||||
|
||||
import styles from './chip-link.module.css'
|
||||
|
||||
import type { PropsWithChildren } from 'react'
|
||||
|
||||
export function ChipLink({
|
||||
children,
|
||||
className,
|
||||
...props
|
||||
}: PropsWithChildren<React.AnchorHTMLAttributes<HTMLAnchorElement>>) {
|
||||
return (
|
||||
<Typography variant="Body/Supporting text (caption)/smBold">
|
||||
<a {...props} className={[styles.chip, className].join(' ')}>
|
||||
{children}
|
||||
</a>
|
||||
</Typography>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
.chip {
|
||||
background-color: var(--Component-Button-Inverted-Default);
|
||||
border-color: var(--Component-Button-Inverted-Border-Default);
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-radius: var(--Corner-radius-sm);
|
||||
padding: var(--Space-x1) var(--Space-x15);
|
||||
color: var(--Text-Interactive-Default);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.chip:hover {
|
||||
/* TODO: change to proper Component-variable once it is available */
|
||||
background-color: var(--Scandic-Peach-10);
|
||||
/* TODO: change to proper Component-variable once it is available */
|
||||
color: var(--Scandic-Red-100);
|
||||
}
|
||||
1
packages/design-system/lib/components/ChipLink/index.tsx
Normal file
1
packages/design-system/lib/components/ChipLink/index.tsx
Normal file
@@ -0,0 +1 @@
|
||||
export { ChipLink } from './ChipLink'
|
||||
Reference in New Issue
Block a user