From 99ea35e1e82cf27fa2d6f1364508e9b4ad14183a Mon Sep 17 00:00:00 2001 From: seb-jean Date: Fri, 13 Dec 2024 16:24:26 +0100 Subject: [PATCH] Change `=` to `:` for named arguments --- doc/functions/html_cva.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/functions/html_cva.rst b/doc/functions/html_cva.rst index 5f86fb5b51..b8c1e27d69 100644 --- a/doc/functions/html_cva.rst +++ b/doc/functions/html_cva.rst @@ -20,8 +20,8 @@ function where you define ``base`` classes that should always be present and the {# templates/alert.html.twig #} {% set alert = html_cva( - base='alert', - variants={ + base: 'alert', + variants: { color: { blue: 'bg-blue', red: 'bg-red', @@ -84,8 +84,8 @@ when multiple other variant conditions are met: .. code-block:: html+twig {% set alert = html_cva( - base='alert', - variants={ + base: 'alert', + variants: { color: { blue: 'bg-blue', red: 'bg-red', @@ -97,7 +97,7 @@ when multiple other variant conditions are met: lg: 'text-lg', } }, - compoundVariants=[{ + compoundVariants: [{ // if color = red AND size = (md or lg), add the `font-bold` class color: ['red'], size: ['md', 'lg'], @@ -128,8 +128,8 @@ If no variants match, you can define a default set of classes to apply: .. code-block:: html+twig {% set alert = html_cva( - base='alert', - variants={ + base: 'alert', + variants: { color: { blue: 'bg-blue', red: 'bg-red', @@ -146,7 +146,7 @@ If no variants match, you can define a default set of classes to apply: lg: 'rounded-lg', } }, - defaultVariant={ + defaultVariant: { rounded: 'md', } ) %}