mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-06 03:04:59 +00:00
20 lines
474 B
Plaintext
20 lines
474 B
Plaintext
--TEST--
|
|
pass Cva object to template
|
|
--TEMPLATE--
|
|
{{ alert.apply({colors: 'primary', sizes: 'sm'}) }}
|
|
--DATA--
|
|
return [
|
|
'alert' => new Twig\Extra\Html\Cva('font-semibold border rounded', [
|
|
'colors' => [
|
|
'primary' => 'text-primary',
|
|
'secondary' => 'text-secondary'
|
|
],
|
|
'sizes' => [
|
|
'sm' => 'text-sm',
|
|
'lg' => 'text-lg'
|
|
]
|
|
])
|
|
];
|
|
--EXPECT--
|
|
font-semibold border rounded text-primary text-sm
|