Skip to content

Commit a206359

Browse files
committed
bug #3345 [Toolkit] Rewrite @prop documentation to normalize Defaults to ... (Kocal)
This PR was merged into the 2.x branch. Discussion ---------- [Toolkit] Rewrite ``@prop`` documentation to normalize `Defaults to ...` | Q | A | -------------- | --- | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md --> | Documentation? | no <!-- required for new features, or documentation updates --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT Related to symfony/ux.symfony.com#15 Commits ------- 521c844 [Toolkit] Rewrite ``@prop`` documentation to normalize `Defaults to ...`
2 parents 9499a50 + 521c844 commit a206359

File tree

26 files changed

+38
-38
lines changed

26 files changed

+38
-38
lines changed

src/Toolkit/kits/shadcn/accordion/templates/components/Accordion.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{# @prop id string Unique identifier for the Accordion #}
2-
{# @prop multiple boolean Whether multiple items can be opened at once, default to `false` #}
2+
{# @prop multiple boolean Whether multiple items can be opened at once. Defaults to `false` #}
33
{# @prop defaultValue string|array<string>|null Value(s) of the item(s) to open by default #}
4-
{# @prop orientation 'vertical'|'horizontal' The visual orientation, controls whether keyboard navigation uses up/down or left/right arrow keys, defaults to `vertical` #}
4+
{# @prop orientation 'vertical'|'horizontal' The visual orientation, controls whether keyboard navigation uses up/down or left/right arrow keys. Defaults to `vertical` #}
55
{# @block content The accordion items, typically multiple `Accordion:Item` components #}
66
{%- props id, multiple = false, defaultValue = null, orientation = 'vertical' -%}
77
{%- set _accordion_id = id -%}

src/Toolkit/kits/shadcn/accordion/templates/components/Accordion/Item.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{# @prop value string Unique value for this accordion item #}
2-
{# @prop open boolean Whether the item is open by default, default to `false` #}
3-
{# @prop disabled boolean Whether the item is disabled, default to `false` #}
2+
{# @prop open boolean Whether the item is open by default. Defaults to `false` #}
3+
{# @prop disabled boolean Whether the item is disabled. Defaults to `false` #}
44
{# @block content The item content, typically an `Accordion:Trigger` and `Accordion:Content` #}
55
{%- props value, open = false, disabled = false -%}
66
{%- set _accordion_item_is_open = open or (_accordion_default_value == value or (_accordion_default_value is iterable and value in defaultValue)) -%}

src/Toolkit/kits/shadcn/alert-dialog/templates/components/AlertDialog/Action.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{# @prop variant 'default'|'secondary'|'destructive'|'outline'|'ghost'|'link' The button style variant, defaults to `default` #}
1+
{# @prop variant 'default'|'secondary'|'destructive'|'outline'|'ghost'|'link' The button style variant. Defaults to `default` #}
22
{# @block content The action button label #}
33
{%- props variant = 'default' -%}
44
<twig:Button variant="{{ variant }}" {{ ...attributes }}>

src/Toolkit/kits/shadcn/alert/templates/components/Alert.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{# @prop variant 'default'|'destructive' The visual style variant, defaults to `default` #}
1+
{# @prop variant 'default'|'destructive' The visual style variant. Defaults to `default` #}
22
{# @block content The alert content, typically includes `Alert:Title` and `Alert:Description` #}
33
{%- props variant = 'default' -%}
44
{%- set style = html_cva(

src/Toolkit/kits/shadcn/avatar/templates/components/Avatar.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{# @prop size 'default'|'sm'|'lg' The avatar size, defaults to `default` #}
1+
{# @prop size 'default'|'sm'|'lg' The avatar size. Defaults to `default` #}
22
{# @block content The avatar content, typically an image or `Avatar:Fallback` #}
33
{%- props size = 'default' -%}
44

src/Toolkit/kits/shadcn/badge/templates/components/Badge.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{# @prop variant 'default'|'secondary'|'destructive'|'outline' The visual style variant, defaults to `default` #}
2-
{# @prop as 'div' The HTML tag to render, defaults to `div` #}
1+
{# @prop variant 'default'|'secondary'|'destructive'|'outline' The visual style variant. Defaults to `default` #}
2+
{# @prop as 'div' The HTML tag to render. Defaults to `div` #}
33
{# @block content The badge label or content #}
44
{%- props variant = 'default', as = 'div' -%}
55
{%- set style = html_cva(

src/Toolkit/kits/shadcn/button-group/templates/components/ButtonGroup.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{# @prop orientation 'horizontal'|'vertical' The layout direction of the button group, defaults to `horizontal` #}
1+
{# @prop orientation 'horizontal'|'vertical' The layout direction of the button group. Defaults to `horizontal` #}
22
{# @block content The grouped buttons and/or separators #}
33
{%- props orientation = 'horizontal' -%}
44
{%- set style = html_cva(

src/Toolkit/kits/shadcn/button-group/templates/components/ButtonGroup/Separator.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{# @prop orientation 'horizontal'|'vertical' The separator orientation, defaults to `vertical` #}
1+
{# @prop orientation 'horizontal'|'vertical' The separator orientation. Defaults to `vertical` #}
22
{# @block content Optional custom separator content #}
33
{%- props orientation = 'vertical' -%}
44
<twig:Separator

src/Toolkit/kits/shadcn/button-group/templates/components/ButtonGroup/Text.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{# @prop as 'div' The HTML tag to render, defaults to `div` #}
1+
{# @prop as 'div' The HTML tag to render. Defaults to `div` #}
22
{# @block content The text content displayed in the button group #}
33
{%- props as = 'div' -%}
44
<{{ as }}

src/Toolkit/kits/shadcn/button/templates/components/Button.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{# @prop variant 'default'|'secondary'|'destructive'|'outline'|'ghost'|'link' The visual style variant, defaults to `default` #}
2-
{# @prop size 'default'|'xs'|'sm'|'lg'|'icon'|'icon-xs'|'icon-sm'|'icon-lg' The button size, defaults to `default` #}
3-
{# @prop as 'button' The HTML tag to render, defaults to `button` #}
1+
{# @prop variant 'default'|'secondary'|'destructive'|'outline'|'ghost'|'link' The visual style variant. Defaults to `default` #}
2+
{# @prop size 'default'|'xs'|'sm'|'lg'|'icon'|'icon-xs'|'icon-sm'|'icon-lg' The button size. Defaults to `default` #}
3+
{# @prop as 'button' The HTML tag to render. Defaults to `button` #}
44
{# @block content The button label and/or icon #}
55
{%- props variant = 'default', size = 'default', as = 'button' -%}
66
{%- set style = html_cva(

0 commit comments

Comments
 (0)