1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 21:14:18 +00:00
pds-2021-g2-nest/code/frontend/src/components/Button.js

15 lines
439 B
JavaScript
Raw Normal View History

2021-04-21 01:57:18 +00:00
import React from "react"
import Style from "./Button.module.css"
import classNames from "classnames"
2021-04-21 01:57:18 +00:00
import make_icon from "../utils/make_icon"
export default function Button({ children, className, color, icon, ...props }) {
return (
2021-04-22 17:10:19 +00:00
<button type={"button"} className={classNames(Style.Button, Style[`Button${color}`], className)} {...props}>
2021-04-21 01:57:18 +00:00
{children} {make_icon(icon, Style.Icon)}
</button>
)
}