From 10cf6beb668f7043206e99fcc94e1a6fecacc73f Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 16 Oct 2020 17:06:58 -0700 Subject: [PATCH] feat #113 - Address PR comments --- src/__snapshots__/storybook.test.ts.snap | 104 +++++++---------------- src/components/Button/Button.stories.tsx | 32 ------- src/components/Button/utils.ts | 9 +- 3 files changed, 38 insertions(+), 107 deletions(-) diff --git a/src/__snapshots__/storybook.test.ts.snap b/src/__snapshots__/storybook.test.ts.snap index 5821c99e..787b492c 100644 --- a/src/__snapshots__/storybook.test.ts.snap +++ b/src/__snapshots__/storybook.test.ts.snap @@ -77,44 +77,6 @@ exports[`Storyshots Button Disabled 1`] = ` `; -exports[`Storyshots Button Google 1`] = ` -
- -
-`; - exports[`Storyshots Button Loading 1`] = `
  @@ -339,7 +301,7 @@ exports[`Storyshots Input Placeholder 1`] = ` className="storyWrapper-0-2-2" >
 
 
  @@ -750,10 +712,10 @@ exports[`Storyshots Select Default 1`] = ` className="storyWrapper-0-2-2" >
Lorem @@ -947,10 +909,10 @@ exports[`Storyshots Select Icon 1`] = ` className="storyWrapper-0-2-2" >
  @@ -1167,27 +1129,27 @@ exports[`Storyshots Skeleton Count 1`] = ` className="storyWrapper-0-2-2" >           @@ -1199,7 +1161,7 @@ exports[`Storyshots Skeleton Default 1`] = ` className="storyWrapper-0-2-2" >   diff --git a/src/components/Button/Button.stories.tsx b/src/components/Button/Button.stories.tsx index e2872619..1eae87b7 100644 --- a/src/components/Button/Button.stories.tsx +++ b/src/components/Button/Button.stories.tsx @@ -1,6 +1,4 @@ import { action } from '@storybook/addon-actions' -import { createUseStyles } from 'react-jss' -import GoogleOutlined from '@ant-design/icons/GoogleOutlined' import React from 'react' import { Button, ButtonProps } from '.' import { Meta, Story } from '@storybook/react/types-6-0' @@ -40,33 +38,3 @@ PrimaryDisabled.args = { disabled: true, primary: true } - -// Google Icon Button -const useStyles = createUseStyles({ - google: { - '&:hover': { - backgroundColor: '#e36e60', - color: 'white' - }, - backgroundColor: '#dd4b39', - border: 'none', - color: 'white' - } -}) - -const GoogleTemplate: Story = ({ ...args }: ButtonProps) => { - const classes = useStyles() - args.classes = [classes.google] - return ( - - ) -} - -export const Google = GoogleTemplate.bind({}) -Google.args = { - children: 'Sign in with Google', - classes: ['google'] -} diff --git a/src/components/Button/utils.ts b/src/components/Button/utils.ts index 7914855b..ddf68834 100644 --- a/src/components/Button/utils.ts +++ b/src/components/Button/utils.ts @@ -1,14 +1,15 @@ import { styleguide, themedStyles, ThemeType } from 'components/assets/styles' -const { blacks } = styleguide.colors +const { borderRadius, colors } = styleguide +const { blacks } = colors const { dark, light } = ThemeType const buttonPalette = { [dark]: { - color: blacks['lighten-30'], + color: blacks['lighten-50'], disabledBgColor: blacks.base, - hoverColor: blacks['lighten-50'], + hoverColor: blacks['lighten-80'], primaryBackgroundColor: blacks['lighten-30'], primaryDisabledBgColor: blacks['lighten-10'], primaryDisabledTextColor: blacks['darken-20'], @@ -40,7 +41,7 @@ export const generateButtonStyles = (themeType: ThemeType) => { const baseButtonStyles = { borderColor: base.borderColor, - borderRadius: 4, + borderRadius, color }