diff --git a/src/lib/components/Button/Button.svelte b/src/lib/components/Button/Button.svelte index 7a08dd6e..7f135893 100644 --- a/src/lib/components/Button/Button.svelte +++ b/src/lib/components/Button/Button.svelte @@ -7,9 +7,10 @@ 'green' | 'red' | 'blue' | - 'orange' = 'accent'; + 'orange' | + 'input' = 'accent'; export let block : boolean = false; - export let variant : 'fill' | 'outline' | 'invisible' | 'outline-fill' = 'fill'; + export let variant : 'fill' | 'fill-light' | 'outline' | 'invisible' | 'outline-fill' = 'fill'; export let align: 'start' | 'center' = 'center'; export let button = {} as HTMLButtonElement | HTMLAnchorElement; @@ -164,14 +165,6 @@ } } - /* styles */ - /* .button.accent { - background-color: var(--accent); - color: var(--accent-text); - transition: .2s box-shadow; - --local-hover-shadow-color: var(--accent-light); - } */ - .button { &.fill { &.accent { @@ -181,6 +174,57 @@ --local-hover-shadow-color: var(--accent-light); } + &.gray { + background-color: var(--gray-dark); + color: var(--text-white); + transition: .2s box-shadow; + --local-hover-shadow-color: var(--gray-light); + } + + &.green { + background-color: var(--green-dark); + color: var(--text-white); + transition: .2s box-shadow; + --local-hover-shadow-color: var(--green-light); + } + + &.red { + background-color: var(--red-dark); + color: var(--text-white); + transition: .2s box-shadow; + --local-hover-shadow-color: var(--red-light); + } + + &.blue { + background-color: var(--blue-dark); + color: var(--text-white); + transition: .2s box-shadow; + --local-hover-shadow-color: var(--blue-light); + } + + &.orange { + background-color: var(--orange-dark); + color: var(--text-white); + transition: .2s box-shadow; + --local-hover-shadow-color: var(--orange-light); + } + + &.input { + background-color: var(--input); + color: var(--text); + transition: .2s box-shadow; + --local-hover-shadow-color: var(--input-hover); + } + } + + &.fill-light { + &.accent { + background-color: var(--accent-light); + color: var(--accent); + transition: .2s box-shadow; + --local-hover-shadow-color: var(--accent-lightest); + } + &.gray { background-color: var(--gray-light); color: var(--gray-dark); @@ -319,6 +363,7 @@ transition: .2s box-shadow; --local-hover-shadow-color: var(--orange-light); } + } &.invisible { @@ -374,22 +419,17 @@ color: var(--orange-dark); } } + + &.input { + &:hover { + background-color: var(--input); + box-shadow: none!important; + color: var(--text); + } + } } } - .button.soft { - background-color: var(--accent-light); - color: var(--accent); - transition: .2s box-shadow; - --local-hover-shadow-color: #eee; - } - - .button.light { - background-color: #f5f5f5; - color: var(--text); - transition: .2s box-shadow; - --local-hover-shadow-color: var(--accent-light); - } :global(:root.dark) .button.light { background-color: #2e2e2e; } @@ -404,13 +444,6 @@ } } - .button.danger { - background-color: var(--red-dark); - color: var(--text-white); - transition: .2s box-shadow; - --local-hover-shadow-color: var(--red-light); - } - /*Styles for button disabled state*/ .button[disabled] { cursor: not-allowed; diff --git a/src/routes/[[slug]]/docs/Button.svelte b/src/routes/[[slug]]/docs/Button.svelte index 4b7ba722..0db9fedd 100644 --- a/src/routes/[[slug]]/docs/Button.svelte +++ b/src/routes/[[slug]]/docs/Button.svelte @@ -128,81 +128,105 @@ All other properties will be forwarded to the underlying element.

Fill

Fill Button - - - - - + + + + + + + `} /> - - - - - - + + + + + + + + + +

Fill-Light

+ +Fill Accent + + + + + +`} /> + + + + + + + +

Outline

Outline Button - - - - - + + + + + + `} /> - - - - - - + + + + + +

Outline Fill

Outline-fill Button - - - - - + + + + + + `} /> - - - - - - + + + + + +

Invisible

Invisible Button - - - - - + + + + + + + `} /> - - - - - - + + + + + + +

Slots