mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
docs: add banners for unreleased, unstable components
This commit is contained in:
parent
ead27350ac
commit
d1ac1f2e27
1 changed files with 21 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
Button,
|
Button,
|
||||||
Select,
|
Select,
|
||||||
SelectItem,
|
SelectItem,
|
||||||
|
InlineNotification,
|
||||||
} from "carbon-components-svelte";
|
} from "carbon-components-svelte";
|
||||||
import Code16 from "carbon-icons-svelte/lib/Code16";
|
import Code16 from "carbon-icons-svelte/lib/Code16";
|
||||||
import { page, metatags } from "@sveltech/routify";
|
import { page, metatags } from "@sveltech/routify";
|
||||||
|
@ -15,6 +16,8 @@
|
||||||
|
|
||||||
export let component = $page.title;
|
export let component = $page.title;
|
||||||
export let source = "";
|
export let source = "";
|
||||||
|
export let unreleased = false;
|
||||||
|
export let unstable = false;
|
||||||
|
|
||||||
metatags.title = $page.title;
|
metatags.title = $page.title;
|
||||||
|
|
||||||
|
@ -118,6 +121,24 @@
|
||||||
Source code
|
Source code
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
{#if unreleased}
|
||||||
|
<InlineNotification
|
||||||
|
lowContrast
|
||||||
|
kind="info"
|
||||||
|
title="Unreleased"
|
||||||
|
subtitle="This component has not been released yet."
|
||||||
|
hideCloseButton
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
|
{#if unstable}
|
||||||
|
<InlineNotification
|
||||||
|
lowContrast
|
||||||
|
kind="warning"
|
||||||
|
title="Unstable component"
|
||||||
|
subtitle="Expect the API of this component to change. Use at your own risk."
|
||||||
|
hideCloseButton
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
</Column>
|
</Column>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue