Simplify clickable class
This commit is contained in:
parent
844463b312
commit
3ba4772210
|
@ -17,19 +17,18 @@
|
||||||
$: vAlignClass = vAlign ? `vAlign-${vAlign}` : ""
|
$: vAlignClass = vAlign ? `vAlign-${vAlign}` : ""
|
||||||
$: sizeClass = size ? `size-${size}` : ""
|
$: sizeClass = size ? `size-${size}` : ""
|
||||||
$: gapClass = gap ? `gap-${gap}` : ""
|
$: gapClass = gap ? `gap-${gap}` : ""
|
||||||
$: clickableClass = onClick ? "clickable" : ""
|
|
||||||
$: classNames = [
|
$: classNames = [
|
||||||
directionClass,
|
directionClass,
|
||||||
hAlignClass,
|
hAlignClass,
|
||||||
vAlignClass,
|
vAlignClass,
|
||||||
sizeClass,
|
sizeClass,
|
||||||
gapClass,
|
gapClass,
|
||||||
clickableClass,
|
|
||||||
].join(" ")
|
].join(" ")
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class={classNames}
|
class={classNames}
|
||||||
|
class:clickable={onClick}
|
||||||
use:styleable={$component.styles}
|
use:styleable={$component.styles}
|
||||||
class:wrap
|
class:wrap
|
||||||
on:click={onClick}
|
on:click={onClick}
|
||||||
|
|
Loading…
Reference in New Issue