Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit db34bf4

Browse files
author
z
committed
ghost button style made
1 parent bd4d527 commit db34bf4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

utils/base.styles.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import styled, { css } from 'react-emotion';
22

3+
const purplePrimary = '#7657fb';
4+
const whiteFull = '#ffffff';
35
export const breakpoints = {
46
xs: '@media screen and (max-width: 40em)',
57
sm: '@media screen and (min-width: 40em) and (max-width: 52em)',
@@ -45,15 +47,18 @@ export const baseButton = css`
4547

4648
export const Button = styled.a`
4749
${baseButton};
48-
background: ${props => (props.inverted ? '#7657fb' : '#fff')}
49-
color: ${props => (props.inverted ? '#fff' : '#222')}
50+
background: ${props => (props.inverted ? '#7657fb' : props.ghost ? '#fff' : '#fff')}
51+
color: ${props => (props.inverted ? '#fff' : props.ghost ? purplePrimary : '#222')}
5052
padding: ${props => (props.large ? '0.8rem 2.25rem' : props.medium ? '0.6rem 1.2rem' : '0.2rem 1rem')};
5153
font-size: ${props => (props.large ? '1.8rem' : props.medium ? '1rem' : '1rem')}
54+
outline:${props => (props.ghost ? `3px solid ${purplePrimary}` : 'none')}
55+
outline-offset:${props => (props.ghost ? '-3px' : '0px')}
5256
cursor: pointer;
5357
user-select: none;
5458
-webkit-touch-callout: none;
5559
&:hover {
56-
background: ${props => (props.inverted ? '#6f19ed' : '#eee')};
60+
background: ${props => (props.inverted ? '#6f19ed' : props.ghost ? purplePrimary : '#eee')};
61+
color: ${props => (props.inverted ? '#fff' : props.ghost ? whiteFull : '#222')}
5762
}
5863
`;
5964

0 commit comments

Comments
 (0)