Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(documentation): adds deprecation message to badge #2410

Merged
merged 8 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/strange-coins-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-documentation': minor
---

Added a deprecation message to the badge documentation.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Canvas, Controls, Meta } from '@storybook/blocks';
import { PostAlert } from '@swisspost/design-system-components-react';
import * as badgeStories from './badge.stories';
import StylesPackageImport from '../../../shared/styles-package-import.mdx';

Expand All @@ -10,12 +11,23 @@ import StylesPackageImport from '../../../shared/styles-package-import.mdx';
Documentation and examples for badges, our small count and labeling component.
</div>

<PostAlert type="warning">
b1aserlu marked this conversation as resolved.
Show resolved Hide resolved
<p slot="heading">Badge is deprecated</p>
<p>
The current `badge` component is deprecated and will be replaced with the `chip` component which will behave similarly to the current `badge` component.
There will also be a new `badge` component, but with a different behavior. Check out the new components in figma:
[Chip](https://www.figma.com/file/xZ0IW0MJO0vnFicmrHiKaY/Components-Post?type=design&node-id=11194-50777&mode=design&t=SeiMf2Vt3dmUnpMT-0)
/
[Badge](https://www.figma.com/file/xZ0IW0MJO0vnFicmrHiKaY/Components-Post?type=design&node-id=11038-51303&mode=design&t=SeiMf2Vt3dmUnpMT-0)
</p>
</PostAlert>

<Canvas sourceState="shown" of={badgeStories.Default} />
<div className="hide-col-default">
<Controls of={badgeStories.Default} />
</div>

<StylesPackageImport components={["badge"]} />
<StylesPackageImport components={['badge']} />

## Examples

Expand Down
Loading