Skip to content

Commit

Permalink
add default value to colorVariable helper
Browse files Browse the repository at this point in the history
  • Loading branch information
mertasan committed Mar 22, 2022
1 parent 2f1592e commit 7c941a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const withRgb = (variable, forceRGB) => {
return startsWith(variable, 'var') ? variable.replace(')', '-rgb)') : 'var(' + variable + '-rgb)'
}

const colorVariable = (variable, forceRGB) => {
const colorVariable = (variable, forceRGB = false) => {
return function ({ opacityVariable, opacityValue }) {
if (opacityValue !== undefined) {
return `rgba(${withRgb(variable, forceRGB)}, ${opacityValue})`
Expand Down

0 comments on commit 7c941a3

Please sign in to comment.