Refactoring because of local scripts and tabs
In this commit I want to refactor some things. - I don't want to use external connections so I moved all that shit to localhost - I do not need so many spaces as it is bad for formatting
This commit is contained in:
parent
80f9586d36
commit
29142a9977
14 changed files with 393 additions and 380 deletions
|
@ -1,32 +1,32 @@
|
|||
import React from 'react';
|
||||
import './Button.css';
|
||||
import { Link } from 'react-router-dom';
|
||||
import React from "react";
|
||||
import "./Button.css";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
const STYLES = ['btn--primary', 'btn--outline'];
|
||||
const STYLES = ["btn--primary", "btn--outline"];
|
||||
|
||||
const SIZES = ['btn--medium', 'btn--large'];
|
||||
const SIZES = ["btn--medium", "btn--large"];
|
||||
export const Button = ({
|
||||
children,
|
||||
type,
|
||||
onClick,
|
||||
buttonStyle,
|
||||
buttonSize
|
||||
children,
|
||||
type,
|
||||
onClick,
|
||||
buttonStyle,
|
||||
buttonSize,
|
||||
}) => {
|
||||
const checkButtonStyle = STYLES.includes(buttonStyle)
|
||||
? buttonStyle
|
||||
: STYLES[0];
|
||||
|
||||
const checkButtonSize = SIZES.includes(buttonSize) ? buttonSize : SIZES[0];
|
||||
const checkButtonStyle = STYLES.includes(buttonStyle)
|
||||
? buttonStyle
|
||||
: STYLES[0];
|
||||
|
||||
return (
|
||||
<Link to='sign-up' className='btn-mobile'>
|
||||
<button
|
||||
className={`btn ${checkButtonStyle} ${checkButtonSize}`}
|
||||
onClick={onClick}
|
||||
type={type}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
const checkButtonSize = SIZES.includes(buttonSize) ? buttonSize : SIZES[0];
|
||||
|
||||
return (
|
||||
<Link to="sign-up" className="btn-mobile">
|
||||
<button
|
||||
className={`btn ${checkButtonStyle} ${checkButtonSize}`}
|
||||
onClick={onClick}
|
||||
type={type}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue