Created the Button.jsx component
This commit is contained in:
parent
e452b07ba7
commit
5dff68998f
8
src/common/components/Button/Button.jsx
Normal file
8
src/common/components/Button/Button.jsx
Normal file
@ -0,0 +1,8 @@
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faCircleNotch} from "@fortawesome/free-solid-svg-icons";
|
||||
import "./styles.sass";
|
||||
|
||||
export const Button = ({type = "primary", text = "Button", onClick, loading = false}) => (
|
||||
<button className={`btn btn-${type}`} onClick={loading ? undefined : onClick} disabled={loading}>{loading &&
|
||||
<FontAwesomeIcon icon={faCircleNotch} spin={true}/>} {text}</button>
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user