-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Modal component + use it on ProjectAssetExplorer
- Loading branch information
1 parent
1375762
commit ddee27e
Showing
14 changed files
with
202 additions
and
61 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import React from 'react' | ||
import classNames from 'classnames' | ||
import cx from 'classnames' | ||
|
||
import { PropTypes } from './types' | ||
import './Button.css' | ||
|
||
function Button(props: PropTypes) { | ||
function Button({ size, type, ...props }: PropTypes) { | ||
return ( | ||
<button {...props} className={classNames('Button', props.className)}> | ||
<button {...props} className={cx('Button', size, type, props.className)}> | ||
{props.children} | ||
</button> | ||
) | ||
} | ||
|
||
export default Button | ||
export default Button |
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 |
---|---|---|
@@ -1 +1,6 @@ | ||
export type PropTypes = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> | ||
type Button = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> | ||
|
||
export type PropTypes = Omit<Button, 'type' | 'size'> & { | ||
type?: 'danger' | 'etc' | ||
size?: 'big' | 'etc' | ||
} |
Oops, something went wrong.