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) => -export const withOnlyLoading = (args: any) => -export const withRef = () => { +export const withOnlyIcon = (args: any) => +export const withOnlyLoading = (args: any) => +export const withRef = () => { const buttonRef = useRef(null) - const [msg, setMsg] = useState("Click button to console.log Ref") + const [msg, setMsg] = useState('Click button to console.log Ref') function onClick() { const message = `container: ${buttonRef?.current.container} button:${buttonRef?.current.button} ` @@ -26,17 +29,137 @@ export const withRef = () => { } return ( - <> - + <> + -
{msg}
- > +{msg}
+ > ) } +export const allButtons = (args: any) => ( + <> +