Skip to content

Commit bde6354

Browse files
committed
[Toolkit][Shadcn] docs for Item component
1 parent 4206923 commit bde6354

File tree

10 files changed

+16
-0
lines changed

10 files changed

+16
-0
lines changed

src/Toolkit/kits/shadcn/item/templates/components/Item.html.twig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
{# @prop variant 'default'|'outline'|'muted' The variant, default to `default` #}
2+
{# @prop size 'default'|'sm' The size, default to `default` #}
3+
{# @prop as 'div' The HTML tag to use, default to `div` #}
4+
{# @block content The default block #}
15
{%- props variant = 'default', size = 'default', as = 'div' -%}
26
{%- set style = html_cva({
37
base: 'group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',

src/Toolkit/kits/shadcn/item/templates/components/Item/Actions.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{# @block content The default block #}
12
<div
23
data-slot="item-actions"
34
class="{{ 'flex items-center gap-2 ' ~ attributes.render('class')|tailwind_merge }}"

src/Toolkit/kits/shadcn/item/templates/components/Item/Content.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{# @block content The default block #}
12
<div
23
data-slot="item-content"
34
class="{{ 'flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none ' ~ attributes.render('class')|tailwind_merge }}"

src/Toolkit/kits/shadcn/item/templates/components/Item/Description.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{# @block content The default block #}
12
<p
23
data-slot="item-description"
34
class="{{ 'text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4 ' ~ attributes.render('class')|tailwind_merge }}"

src/Toolkit/kits/shadcn/item/templates/components/Item/Footer.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{# @block content The default block #}
12
<div
23
data-slot="item-footer"
34
class="{{ 'flex basis-full items-center justify-between gap-2 ' ~ attributes.render('class')|tailwind_merge }}"

src/Toolkit/kits/shadcn/item/templates/components/Item/Group.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{# @block content The default block #}
12
<div
23
role="list"
34
data-slot="item-group"

src/Toolkit/kits/shadcn/item/templates/components/Item/Header.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{# @block content The default block #}
12
<div
23
data-slot="item-header"
34
class="{{ 'flex basis-full items-center justify-between gap-2 ' ~ attributes.render('class')|tailwind_merge }}"

src/Toolkit/kits/shadcn/item/templates/components/Item/Media.html.twig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{# @prop variant 'default'|'icon'|'image' The variant, default to `default` #}
2+
{# @block content The default block #}
13
{%- props variant = 'default' -%}
24
{%- set style = html_cva({
35
base: 'flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5',

src/Toolkit/kits/shadcn/item/templates/components/Item/Separator.html.twig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{# @prop orientation 'horizontal'|'vertical' The orientation, default to `horizontal` #}
2+
{# @prop decorative bool Whether the separator is decorative, default to `true` #}
3+
{# @block content The default block #}
14
{%- props orientation = 'horizontal', decorative = true -%}
25

36
<div

src/Toolkit/kits/shadcn/item/templates/components/Item/Title.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{# @block content The default block #}
12
<div
23
data-slot="item-title"
34
class="{{ 'flex w-fit items-center gap-2 text-sm leading-snug font-medium ' ~ attributes.render('class')|tailwind_merge }}"

0 commit comments

Comments
 (0)