styled
styled(tagName: String | Function, forwardRef?: Function)
@param {String|Function} tagName
The name of the dom element you'd like the styled to be applied to@param {Function} forwardRef
Forward ref function. UsuallyReact.forwardRef
@returns {Function}
Returns the tag template function.
#
Different ways of customizing the styles#
Tagged templates functions#
Function that returns a string#
JSON/Object#
Arrays#
Forward ref functionAs goober is JSX library agnostic, you need to pass in the forward ref function for the library you are using. Here's how you do it for React.
#
Conditional stylingIf the value of a property is undefined
or null
, goober will ommit them.