Skip to content

Latest commit

 

History

History
20 lines (11 loc) · 828 Bytes

File metadata and controls

20 lines (11 loc) · 828 Bytes

Home > @asl-19/emotion-utils > Styles

Styles type

Emotion CSSObject or SerializedStyles (or array containing them).

Signature:

type Styles = Array<CSSObject | SerializedStyles> | CSSObject | SerializedStyles;

Remarks

Useful to allow style utility functions to accept CSSObject directly with type safety and IntelliSense.

This should only be used for functions that accept styles and return SerializedStyles — not for raw values passed to the css prop. If we pass an object or array to the css prop directly the styles will be serialized on each render (rather than serialized once when the module loads).