diff --git a/src/components/Button/Button.css b/src/components/Button/Button.css index 2a7fbba0..ad5c2ff2 100644 --- a/src/components/Button/Button.css +++ b/src/components/Button/Button.css @@ -7,11 +7,10 @@ @apply rounded; font-family: inherit; font-weight: inherit; - text-shadow: 0 -1px 0 rgba(0,0,0,.12); } .sbui-btn-container--shadow { - box-shadow: 0 2px 0 rgba(0,0,0,.045); + box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045); } .sbui-btn--w-full { @@ -47,16 +46,17 @@ Button varients */ .sbui-btn-primary { - @apply text-white bg-brand-700 hover:bg-brand-600; - @apply dark:hover:bg-brand-800; + @apply text-white bg-brand-800 hover:bg-brand-600; + @apply dark:hover:bg-brand-900; + text-shadow: 0px 0px 4px rgba(38 111 78 / 50%); } .sbui-btn-default { - @apply text-gray-500 bg-white border-gray-300 hover:text-gray-600; - @apply hover:bg-white hover:border-gray-200; - + @apply text-gray-500 bg-white border-gray-300 hover:text-gray-600; + @apply hover:bg-white hover:border-gray-200; + @apply dark:border-dark-700 dark:bg-gray-600 dark:text-dark-200; @apply dark:hover:bg-gray-700; - + text-shadow: 0px 0px 4px rgba(31 31 31 / 50%); } .sbui-btn-secondary { @apply text-gray-600 bg-gray-200; @@ -64,6 +64,7 @@ @apply dark:text-gray-300 dark:bg-gray-500; @apply dark:hover:bg-gray-600; + text-shadow: 0px 0px 4px rgba(42 42 42 / 50%); } .sbui-btn-outline { @apply border text-gray-500 bg-transparent border-gray-200 border-solid hover:bg-white hover:text-gray-600 hover:border-gray-600 dark:text-white dark:border-dark-400 dark:hover:text-dark-600 dark:hover:border-white; @@ -73,7 +74,7 @@ @apply dark:text-white dark:border-dark-400 dark:hover:text-white dark:hover:border-white; } .sbui-btn-link { - @apply text-brand-700 bg-transparent text-brand-700 border-none hover:bg-brand-300 hover:bg-opacity-25; + @apply text-brand-800 bg-transparent text-brand-800 border-none hover:bg-brand-900 hover:bg-opacity-25; } .sbui-btn-text { @apply text-gray-400 bg-transparent border-none hover:bg-gray-200 hover:bg-opacity-25; @@ -81,18 +82,24 @@ } .sbui-btn--danger { - @apply border-red-500 text-red-500; + @apply border-red-500 text-red-500; @apply dark:border-red-500 dark:text-red-500; + text-shadow: 0px 0px 4px rgba(229, 62, 62 / 50%); } .sbui-btn-primary.sbui-btn--danger { @apply bg-red-500 text-white; @apply hover:bg-red-600 hover:border-red-600; } -.sbui-btn-default.sbui-btn--danger, .sbui-btn-secondary.sbui-btn--danger, .sbui-btn-outline.sbui-btn--danger, .sbui-btn-dashed.sbui-btn--danger, .sbui-btn-link.sbui-btn--danger, .sbui-btn-text.sbui-btn--danger { +.sbui-btn-default.sbui-btn--danger, +.sbui-btn-secondary.sbui-btn--danger, +.sbui-btn-outline.sbui-btn--danger, +.sbui-btn-dashed.sbui-btn--danger, +.sbui-btn-link.sbui-btn--danger, +.sbui-btn-text.sbui-btn--danger { @apply hover:bg-red-600 hover:text-white hover:border-red-600; } - /* { +/* { @apply hover:bg-red-600 hover:text-white hover:border-red-600; } */ diff --git a/src/components/Button/Button.stories.tsx b/src/components/Button/Button.stories.tsx index 7015ede9..dcdeda7e 100644 --- a/src/components/Button/Button.stories.tsx +++ b/src/components/Button/Button.stories.tsx @@ -1,6 +1,7 @@ import React, { useRef, useState } from 'react' import { Button } from '.' +import { Space } from '../../components/Space' import { Icon } from '../Icon' export default { @@ -11,13 +12,15 @@ export default { export const Default = (args: any) => export const withStyles = (args: any) => export const withIcon = (args: any) => -export const withIconRight = (args: any) => +export const withIconRight = (args: any) => ( + +) export const withBlock = (args: any) => -export const withOnlyIcon = (args: any) => + <> + -

{msg}

- +

{msg}

+ ) } +export const allButtons = (args: any) => ( + <> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +) -const icon = +const icon = withIcon.args = { type: 'primary', @@ -45,23 +168,28 @@ withIcon.args = { withIconRight.args = { type: 'primary', - iconRight: , + iconRight: , } withStyles.args = { type: 'primary', - style: {backgroundColor: 'red', color: 'yellow'} + style: { backgroundColor: 'red', color: 'yellow' }, } withBlock.args = { type: 'primary', - block: true + block: true, } withOnlyIcon.args = { - icon: icon + icon: icon, } withOnlyLoading.args = { - loading: true -} \ No newline at end of file + loading: true, +} + +allButtons.args = { + loading: false, + danger: false, +} diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 3710bb5b..06970046 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -47,7 +47,7 @@ const Button = forwardRef( iconRight, loading = false, shadow = true, - size = 'medium', + size = 'tiny', style, type = 'primary', htmlType, diff --git a/tailwind.config.js b/tailwind.config.js index a768ab4e..384f80d5 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -34,8 +34,8 @@ module.exports = { 500: '#9FE7C7', 600: '#65D9A5', 700: '#3ECF8E', - 800: '#38BC81', - 900: '#10633E', + 800: '#24b47e', // green-500 in dashboard + 900: '#2c9c6a', }, gray: {