mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23:02 +00:00
docs: display "Required" tag for required props
This commit is contained in:
parent
de6c4deae8
commit
5ff07d60b8
1 changed files with 6 additions and 1 deletions
|
@ -68,13 +68,18 @@
|
|||
<InlineSnippet code="{prop.name}" />
|
||||
{#if prop.reactive}
|
||||
<div
|
||||
style="white-space: nowrap; margin-top: var(--cds-spacing-03); margin-bottom: var(--cds-spacing-03)"
|
||||
style="white-space: nowrap; margin-top: var(--cds-spacing-03); margin-bottom: var(--cds-spacing-{prop.isRequired
|
||||
? '01'
|
||||
: '03'})"
|
||||
>
|
||||
<Tag style="margin-left: 0" size="sm" type="cyan">
|
||||
Reactive
|
||||
</Tag>
|
||||
</div>
|
||||
{/if}
|
||||
{#if prop.isRequired}
|
||||
<Tag size="sm" type="magenta">Required</Tag>
|
||||
{/if}
|
||||
</StructuredListCell>
|
||||
<StructuredListCell>
|
||||
{#each (prop.type || "").split(" | ") as type, i (type)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue