convert Detail component to new API
This commit is contained in:
parent
2d8e200591
commit
bf1173698e
|
@ -1,21 +1,15 @@
|
||||||
<script>
|
<script>
|
||||||
import "@spectrum-css/typography/dist/index-vars.css"
|
import "@spectrum-css/typography/dist/index-vars.css"
|
||||||
|
|
||||||
// Sizes
|
// Sizes
|
||||||
export let xl = false;
|
export let size = "M"
|
||||||
export let l = false;
|
|
||||||
export let m = false;
|
|
||||||
export let s = false;
|
|
||||||
|
|
||||||
export let serif = false;
|
export let serif = false
|
||||||
$: useDefault = ![xl, l, m, s].includes(true)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<p class="spectrum-Detail"
|
<p
|
||||||
class:spectrum-Detail--serif={serif}
|
class="spectrum-Detail spectrum-Detail--size{size}"
|
||||||
class:spectrum-Detail--sizeXL={xl}
|
class:spectrum-Detail--serif={serif}
|
||||||
class:spectrum-Detail--sizeL={l}
|
>
|
||||||
class:spectrum-Detail--sizeM={m || useDefault}
|
<slot />
|
||||||
class:spectrum-Detail--sizeS={s}>
|
|
||||||
<slot />
|
|
||||||
</p>
|
</p>
|
Loading…
Reference in New Issue