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