Removing the button
This commit is contained in:
parent
1a516e3bf5
commit
8358992698
|
@ -1,7 +1,6 @@
|
||||||
import './App.css';
|
import './App.css';
|
||||||
import {AwesomeButton} from 'react-awesome-button';
|
import {AwesomeButton} from 'react-awesome-button';
|
||||||
import FacebookStyle from './styles/facebook.scss';
|
import FacebookStyle from './styles/facebook.scss';
|
||||||
import { Button} from './button/Button';
|
|
||||||
import data from './roots.json'
|
import data from './roots.json'
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
import "./button.css";
|
|
||||||
|
|
||||||
const STYLES = [
|
|
||||||
"btn--primary--solid",
|
|
||||||
"btn--warning--solid",
|
|
||||||
"btn--solid--solid",
|
|
||||||
"btn--success--solid",
|
|
||||||
"btn--primary--outline",
|
|
||||||
"btn--primary--outline",
|
|
||||||
"btn--primary--outline",
|
|
||||||
"btn--primary--outline",
|
|
||||||
]
|
|
||||||
|
|
||||||
const SIZES = ["btn--medium", "btn--small"]
|
|
||||||
|
|
||||||
export const Button = ({children, type, onClick, buttonStyle, buttonSize}) => {
|
|
||||||
const checkButtonStyle = STYLES.includes(buttonStyle) ? buttonStyle : STYLES[0];
|
|
||||||
const checkButtonSize = SIZES.includes(buttonSize) ? buttonSize : SIZES[0];
|
|
||||||
return (
|
|
||||||
<button onClick={onClick} className={'btn ${setButtonStyle} ${setButtonSize}'} type={type}>
|
|
||||||
{children}
|
|
||||||
</button>
|
|
||||||
);
|
|
||||||
};
|
|
Loading…
Reference in New Issue