styled
styled(tagName: String | Function, forwardRef?: Function)
- @param {String|Function} tagNameThe name of the dom element you'd like the styled to be applied to
- @param {Function} forwardRefForward ref function. Usually- React.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 function#
As 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 styling#
If the value of a property is undefined or null, goober will ommit them.
