From 98b3c3550cd9f7b2c5ff0498db5365f373e93d45 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Tue, 29 Aug 2023 18:03:38 +0200 Subject: [PATCH] docs: add missing component slots --- docs/content/3.forms/5.checkbox.md | 18 +++++++++++++++++ docs/content/3.forms/6.radio.md | 18 +++++++++++++++++ .../content/5.navigation/2.command-palette.md | 20 +++++++++++++++++++ docs/content/6.overlays/3.popover.md | 6 ++++++ docs/content/6.overlays/4.tooltip.md | 16 +++++++++++++++ docs/content/7.layout/1.card.md | 10 ++++++++++ 6 files changed, 88 insertions(+) diff --git a/docs/content/3.forms/5.checkbox.md b/docs/content/3.forms/5.checkbox.md index f77339de..f399a444 100644 --- a/docs/content/3.forms/5.checkbox.md +++ b/docs/content/3.forms/5.checkbox.md @@ -95,6 +95,24 @@ props: --- :: +## Slots + +### `label` + +Use the `#label` slot to override the content of the label. + +::component-card +--- +slots: + label: Label +baseProps: + name: 'checkbox5' +--- + +#label + [Label]{.italic} +:: + ## Props :component-props diff --git a/docs/content/3.forms/6.radio.md b/docs/content/3.forms/6.radio.md index cf453edb..a5ead48c 100644 --- a/docs/content/3.forms/6.radio.md +++ b/docs/content/3.forms/6.radio.md @@ -109,6 +109,24 @@ props: --- :: +## Slots + +### `label` + +Use the `#label` slot to override the content of the label. + +::component-card +--- +slots: + label: Label +baseProps: + name: 'radio6' +--- + +#label + [Label]{.italic} +:: + ## Props :component-props diff --git a/docs/content/5.navigation/2.command-palette.md b/docs/content/5.navigation/2.command-palette.md index 5c82e585..e4462b3f 100644 --- a/docs/content/5.navigation/2.command-palette.md +++ b/docs/content/5.navigation/2.command-palette.md @@ -329,6 +329,26 @@ The `loading` state will automatically be enabled when a `search` function is lo ## Slots +### `-icon` + +Use the `#-icon` slot to override the left command content which display by default the `icon`, `avatar` and `chip`. + +### `-command` + +Use the `#-command` slot to override the command content which display by default the `prefix`, `suffix` and `label` (customizable through the `command-attribute` prop). + +### `-active` + +Use the `#-active` slot to override the right command content (when hovered) which display by default the `active` field of the group if provided. + +### `-inactive` + +Use the `#-inactive` slot to override the right command content (when not hovered) which display by default the `inactive` field of the group if provided or the `shortcuts` of the command. + +::callout{icon="i-heroicons-light-bulb"} +The 4 slots above will have access to the `group`, `command`, `active` and `selected` properties in the slot scope. +:: + ### `empty-state` Use the `#empty-state` slot to customize the empty state. diff --git a/docs/content/6.overlays/3.popover.md b/docs/content/6.overlays/3.popover.md index 3e7899fe..7aa5dc6a 100644 --- a/docs/content/6.overlays/3.popover.md +++ b/docs/content/6.overlays/3.popover.md @@ -49,6 +49,12 @@ Use the `mode` prop to switch between `click` and `hover` modes. ``` :: +## Slots + +### `panel` + +Use the `#panel` slot to fill the content of the panel. + ## Props :component-props diff --git a/docs/content/6.overlays/4.tooltip.md b/docs/content/6.overlays/4.tooltip.md index 1fb9f6c7..a88cea72 100644 --- a/docs/content/6.overlays/4.tooltip.md +++ b/docs/content/6.overlays/4.tooltip.md @@ -21,6 +21,22 @@ links: ``` :: +## Slots + +### `text` + +Use the `#text` slot to override the content of the text. + +::component-card +--- +slots: + text: Hello World! +--- + +#text + [Hello World!]{.italic} +:: + ## Props :component-props diff --git a/docs/content/7.layout/1.card.md b/docs/content/7.layout/1.card.md index 832d0096..e42e7862 100644 --- a/docs/content/7.layout/1.card.md +++ b/docs/content/7.layout/1.card.md @@ -26,6 +26,16 @@ links: ``` :: +## Slots + +### `header` + +Use the `#header` slot to fill the header. + +### `footer` + +Use the `#footer` slot to fill the footer. + ## Props :component-props