mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 19:44:21 +00:00
🐛 Fix Color breaking outside the styleguide
This commit is contained in:
parent
759d9c1479
commit
a85421b2f8
2 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bluelib",
|
||||
"version": "2.1.0",
|
||||
"version": "2.1.1",
|
||||
"description": "React components for Bluelib",
|
||||
"readme": "README.md",
|
||||
"main": "lib/index.js",
|
||||
|
|
|
@ -6,6 +6,8 @@ import color from "color"
|
|||
|
||||
|
||||
export default function Color({children, builtin, custom}) {
|
||||
const potentialClassName = useBluelibClassNames(`color-${builtin}`)
|
||||
|
||||
if(builtin && custom) {
|
||||
throw new Error("<Color> tags may only have one prop between `builtin` and `custom`.")
|
||||
}
|
||||
|
@ -14,7 +16,7 @@ export default function Color({children, builtin, custom}) {
|
|||
let extraStyle = {};
|
||||
|
||||
if(builtin !== undefined) {
|
||||
extraClassName = useBluelibClassNames(`color-${builtin}`)
|
||||
extraClassName = potentialClassName
|
||||
|
||||
}
|
||||
if(custom !== undefined) {
|
||||
|
|
Loading…
Reference in a new issue