mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 03:01:25 +00:00
refactor: prefer class directive over class attribute (#1318)
This commit is contained in:
parent
40e18fbc88
commit
0801e1d078
9 changed files with 34 additions and 18 deletions
|
@ -247,10 +247,11 @@
|
|||
class:bx--date-picker="{true}"
|
||||
class:bx--date-picker--short="{short}"
|
||||
class:bx--date-picker--light="{light}"
|
||||
class="{datePickerType && `bx--date-picker--${datePickerType}`}
|
||||
{datePickerType === 'range' &&
|
||||
$labelTextEmpty &&
|
||||
'bx--date-picker--nolabel'}"
|
||||
class:bx--date-picker--simple="{datePickerType === 'simple'}"
|
||||
class:bx--date-picker--single="{datePickerType === 'single'}"
|
||||
class:bx--date-picker--range="{datePickerType === 'range'}"
|
||||
class:bx--date-picker--nolabel="{datePickerType === 'range' &&
|
||||
$labelTextEmpty}"
|
||||
on:keydown="{(e) => {
|
||||
if (calendar?.isOpen && e.key === 'Escape') {
|
||||
e.stopPropagation();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue