mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
refactor(aspect-ratio): use class name directive
This commit is contained in:
parent
1be9ea4b62
commit
9b74c55bf4
1 changed files with 8 additions and 2 deletions
|
@ -7,9 +7,15 @@
|
|||
</script>
|
||||
|
||||
<div
|
||||
{...$$restProps}
|
||||
class:bx--aspect-ratio="{true}"
|
||||
class="bx--aspect-ratio--{ratio} {$$restProps.class}"
|
||||
class:bx--aspect-ratio--2x1="{ratio === '2x1'}"
|
||||
class:bx--aspect-ratio--16x9="{ratio === '16x9'}"
|
||||
class:bx--aspect-ratio--4x3="{ratio === '4x3'}"
|
||||
class:bx--aspect-ratio--1x1="{ratio === '1x1'}"
|
||||
class:bx--aspect-ratio--3x4="{ratio === '3x4'}"
|
||||
class:bx--aspect-ratio--9x16="{ratio === '9x16'}"
|
||||
class:bx--aspect-ratio--1x2="{ratio === '1x2'}"
|
||||
{...$$restProps}
|
||||
>
|
||||
<div class:bx--aspect-ratio--object="{true}">
|
||||
<slot />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue