Skip to content

Latest commit

 

History

History
56 lines (27 loc) · 898 Bytes

File metadata and controls

56 lines (27 loc) · 898 Bytes

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

devLabel() function

Returns CSSObject containing provided label, but only in development.

Signature:

devLabel: (label: string) => CSSObject | null

Parameters

Parameter

Type

Description

label

string

Returns:

CSSObject | null

Remarks

Emotion’s css prop transform doesn’t strip manually added labels in prod, so we should use this utility to avoid long (and potentially CPU expensive?) generated classNames in production.