1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-12-23 20:14:21 +00:00
bluelib/src/components/Color/index.js

20 lines
512 B
JavaScript
Raw Normal View History

2021-01-25 18:37:58 +00:00
import React from "react";
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
import PropTypes from "prop-types";
export default function Color({children, className, value}) {
return (
<span className={useBluelibClassNames(`color-${value}`, className)}>
{children}
</span>
)
}
Color.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
value: PropTypes.oneOf(["red", "orange", "yellow", "lime", "cyan", "blue", "magenta"]),
}