-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(button): primary & secondary styles (#402)
* chore(button): smooth background to match designs * chore(button): differentiate primary and secondary
- Loading branch information
Showing
16 changed files
with
100 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/renderer/shared/components/Forms/PrimaryButton/PrimaryButton.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import { string } from 'prop-types'; | ||
|
||
import Button from '../Button'; | ||
import styles from './PrimaryButton.scss'; | ||
|
||
export default class PrimaryButton extends React.PureComponent { | ||
render() { | ||
return ( | ||
<Button | ||
{...this.props} | ||
ref={this.registerRef} | ||
className={classNames(styles.primaryButton, this.props.className)} | ||
/> | ||
); | ||
} | ||
|
||
registerRef = (el) => { | ||
this.button = el; | ||
} | ||
|
||
focus = () => { | ||
this.button.focus(); | ||
} | ||
|
||
blur = () => { | ||
this.button.blur(); | ||
} | ||
} | ||
|
||
PrimaryButton.propTypes = { | ||
className: string | ||
}; | ||
|
||
PrimaryButton.defaultProps = { | ||
className: null | ||
}; |
12 changes: 12 additions & 0 deletions
12
src/renderer/shared/components/Forms/PrimaryButton/PrimaryButton.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.primaryButton { | ||
background: radial-gradient(182.57px at 51.06% 50%, #5bba47 0%, #8bcd38 100%); | ||
color: #fff; | ||
font-weight: bold; | ||
box-shadow: 0 4px 8px rgba(53, 52, 69, 0.1); | ||
text-shadow: 0 1px 2px rgba(53, 52, 69, 0.45); | ||
letter-spacing: 0.5px; | ||
|
||
&:not([disabled]):hover { | ||
box-shadow: 0 4px 8px rgba(53, 52, 69, 0.2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './PrimaryButton'; |