adds defaults to Typography components
This commit is contained in:
parent
7384e88613
commit
72fc3ea6dd
|
@ -12,7 +12,7 @@
|
|||
export let xxs = false;
|
||||
|
||||
export let serif = false;
|
||||
|
||||
$: useDefault = ![xxxl, xxl, xl, l, m, s, xs, xxs].includes(true)
|
||||
</script>
|
||||
|
||||
<p class="spectrum-Body"
|
||||
|
@ -21,7 +21,7 @@
|
|||
class:spectrum-Body--sizeXXL={xxl}
|
||||
class:spectrum-Body--sizeXL={xl}
|
||||
class:spectrum-Body--sizeL={l}
|
||||
class:spectrum-Body--sizeM={m}
|
||||
class:spectrum-Body--sizeM={m || useDefault}
|
||||
class:spectrum-Body--sizeS={s}
|
||||
class:spectrum-Body--sizeXS={xs}
|
||||
class:spectrum-Body--sizeXXS={xxs}>
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
export let m = false;
|
||||
export let s = false;
|
||||
export let xs = false;
|
||||
|
||||
$: useDefault = ![xl, l, m, s, xs].includes(true)
|
||||
</script>
|
||||
|
||||
<code class="spectrum-Code"
|
||||
class:spectrum-Code--sizeXL={xl}
|
||||
class:spectrum-Code--sizeL={l}
|
||||
class:spectrum-Code--sizeM={m}
|
||||
class:spectrum-Code--sizeM={m || useDefault}
|
||||
class:spectrum-Code--sizeS={s}
|
||||
class:spectrum-Code--sizeXS={xs}>
|
||||
<slot />
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
export let s = false;
|
||||
|
||||
export let serif = false;
|
||||
|
||||
$: useDefault = ![xl, l, m, s].includes(true)
|
||||
</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}
|
||||
class:spectrum-Detail--sizeM={m || useDefault}
|
||||
class:spectrum-Detail--sizeS={s}>
|
||||
<slot />
|
||||
</p>
|
Loading…
Reference in New Issue