misc: update sidebar button
This commit is contained in:
1 parent
8417de1901
commit
1401e30a09
3 files changed
+18
-32
No files matched your search
@@ -15,15 +15,15 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
color="tertiary"
|
color="none"
|
||||||
alignment="left"
|
alignment="left"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
{href}
|
{href}
|
||||||
on:click
|
on:click
|
||||||
on:contextmenu
|
on:contextmenu
|
||||||
class="font-normal block !origin-left {selected
|
class="font-normal block !origin-left border border-transparent {selected
|
||||||
? 'text-primary-900 dark:!text-primary-100 bg-slate-100 dark:bg-zinc-800'
|
? 'text-primary-900 dark:!text-primary-100 bg-slate-100 dark:bg-zinc-900'
|
||||||
: 'text-slate-600 dark:text-zinc-400'} {$$props.class}"
|
: 'text-slate-600 dark:text-zinc-400'} hover:bg-slate-100 dark:hover:bg-zinc-800 {$$props.class}"
|
||||||
>
|
>
|
||||||
<slot {selected} name="icon" slot="prefix">
|
<slot {selected} name="icon" slot="prefix">
|
||||||
{#if icon}
|
{#if icon}
|
||||||
|
|||||||
@@ -122,8 +122,8 @@
|
|||||||
export let shadow: ButtonShadow = 'none'
|
export let shadow: ButtonShadow = 'none'
|
||||||
export let column: boolean = false
|
export let column: boolean = false
|
||||||
export let animations = {
|
export let animations = {
|
||||||
scale: size != 'sm',
|
scale: false,
|
||||||
large: size == 'square-sm' || size == 'square-md' || size == 'square-lg',
|
large: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
export let loaderWidth: number | undefined = undefined
|
export let loaderWidth: number | undefined = undefined
|
||||||
@@ -155,8 +155,6 @@
|
|||||||
? 'origin-left'
|
? 'origin-left'
|
||||||
: 'origin-right'}
|
: 'origin-right'}
|
||||||
{$$props.class}"
|
{$$props.class}"
|
||||||
class:button-scale={animations.scale}
|
|
||||||
class:anim-large={animations.large}
|
|
||||||
type={submit ? 'submit' : 'button'}
|
type={submit ? 'submit' : 'button'}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -182,25 +180,3 @@
|
|||||||
@slot `prefix` -- Will be replaced if `loading` is `true`.
|
@slot `prefix` -- Will be replaced if `loading` is `true`.
|
||||||
@slot `suffix`
|
@slot `suffix`
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<style>
|
|
||||||
.button-scale > .button-content {
|
|
||||||
transition: transform 300ms cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.button-scale.origin-left > .button-content {
|
|
||||||
transform-origin: left;
|
|
||||||
}
|
|
||||||
.button-scale:hover > .button-content {
|
|
||||||
transform: scale(103%);
|
|
||||||
}
|
|
||||||
.anim-large.button-scale:hover > .button-content {
|
|
||||||
transform: scale(110%);
|
|
||||||
}
|
|
||||||
.button-scale:active > .button-content {
|
|
||||||
transform: scale(99%);
|
|
||||||
}
|
|
||||||
.button-scale:active.anim-large > .button-content {
|
|
||||||
transform: scale(95%);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -5,8 +5,18 @@
|
|||||||
export let content: string | undefined = undefined
|
export let content: string | undefined = undefined
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Material padding="sm" class="flex flex-row space-x-2 items-center">
|
<Material
|
||||||
<Icon src={InformationCircle} size="18" mini />
|
padding="none"
|
||||||
|
rounding="full"
|
||||||
|
color="uniform"
|
||||||
|
class="flex flex-row space-x-2 items-center px-4 py-3"
|
||||||
|
>
|
||||||
|
<Icon
|
||||||
|
src={InformationCircle}
|
||||||
|
size="20"
|
||||||
|
mini
|
||||||
|
class="text-primary-900 dark:text-primary-100"
|
||||||
|
/>
|
||||||
<p>
|
<p>
|
||||||
{#if $$slots.default}
|
{#if $$slots.default}
|
||||||
<slot />
|
<slot />
|
||||||
|
|||||||
Reference in new issue
Block a user