source: imaps-frontend/src/pages/IMaps/components/Button.jsx

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 596 bytes
RevLine 
[d565449]1import React from "react";
2import "./Button.css";
3import { Link } from "react-router-dom";
4
5const STYLES = ["btn--primary", "btn--outline", "btn--test"];
6
7const SIZES = ["btn--medium", "btn--large"];
8
9export const Button = ({ children, type, onClick, buttonStyle, buttonSize }) => {
10 const checkButtonStyle = STYLES.includes(buttonStyle) ? buttonStyle : STYLES[0];
11
12 const checkButtonSize = SIZES.includes(buttonSize) ? buttonSize : SIZES[0];
13
14 return (
15 <button className={`btn ${checkButtonStyle} ${checkButtonSize}`} onClick={onClick} type={type}>
16 {children}
17 </button>
18 );
19};
Note: See TracBrowser for help on using the repository browser.