Cоздан компонент Button

parent 9e793374
.button {
padding: 16px;
width: 100%;
border: none;
border-radius: 8px;
}
.darkBlue {
background-color: #005FDB;
color: #fff
}
.lightBlue {
background-color: #005FDB3D;
color: #003366;
}
import styles from "./Button.module.css"
type Props = {
type: "darkBlue" | "lightBlue"
title: string
onClick: () => void
}
const Button = ({type, title, onClick }: Props) => {
return (
<button
className={`${styles.button} ${type === "darkBlue" ? styles.darkBlue : styles.lightBlue}`}
onClick={onClick}
>
{title}
</button>
)
}
export default Button
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment