diff --git a/package.json b/package.json index ac7abd4..1662e62 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/Color/index.js b/src/components/Color/index.js index e3bda76..e2f1162 100644 --- a/src/components/Color/index.js +++ b/src/components/Color/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(" 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) {