-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #390 from DistributedCollective/development
Release
- Loading branch information
Showing
38 changed files
with
6,163 additions
and
109 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
"stories": [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/preset-create-react-app" | ||
] | ||
} |
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,4 @@ | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.button { | ||
background: #FEC004; | ||
border: 1px solid #FEC004; | ||
color: #000000; | ||
border-radius: 10px; | ||
transition: background 0.3s, color 0.3s, border 0.3s; | ||
cursor: pointer; | ||
height: 50px; | ||
padding: 0 25px; | ||
font-size: 20px; | ||
font-weight: 700; | ||
line-height: 24px; | ||
} | ||
|
||
.button:hover { | ||
background: rgb(254, 192, 4, 0.8); | ||
} | ||
|
||
.button.inverted { | ||
background: #000000; | ||
color: #FEC004; | ||
} | ||
|
||
.button.inverted:hover { | ||
background: rgba(254, 192, 4, 0.25); | ||
} | ||
|
||
.button.inverted:active { | ||
background: rgba(254, 192, 4, 0.5); | ||
} |
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,9 @@ | ||
import React from 'react'; | ||
import { Button } from './index'; | ||
|
||
export const Primary = () => <Button text="Button" onClick={() => {}} />; | ||
export const Secondary = () => <Button text="Button" loading disabled onClick={() => {}} />; | ||
|
||
export default { | ||
title: 'Form Elements', | ||
}; |
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,35 @@ | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import styles from './index.module.css'; | ||
|
||
type ButtonType = 'button' | 'submit' | 'reset'; | ||
|
||
interface Props { | ||
text: React.ReactNode; | ||
onClick?: () => void; | ||
inverted?: boolean; | ||
type?: ButtonType; | ||
disabled?: boolean; | ||
loading?: boolean; | ||
className?: string; | ||
} | ||
export function Button({ text, inverted, loading, ...props }: Props) { | ||
return ( | ||
<button | ||
{...props} | ||
className={classNames( | ||
styles.button, | ||
props.className, | ||
inverted && styles.inverted, | ||
)} | ||
> | ||
{text} | ||
</button> | ||
); | ||
} | ||
|
||
Button.defaultProps = { | ||
type: 'button', | ||
inverted: false, | ||
onClick: () => {}, | ||
}; |
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
Oops, something went wrong.
e712445
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: