diff --git a/README.md b/README.md index b3f75f8..88dc4f8 100644 --- a/README.md +++ b/README.md @@ -123,16 +123,17 @@ rendered as: ``` ## Apply class names based on properties +If the custom property name isn't the part of the element, you must prefix it with `$` to prevent it from being reflected to the element's attribute or getting type errors. ```jsx const Button = el.button` inline-flex font:14 - ${({color}) => color && `font:white bg:${color}`)} + ${({$color}) => $color && `font:white bg:${$color}`)} ` return ( - - + + ) ```