UNPKG

@primer/primitives

Version:

Typography, spacing, and color primitives for Primer design system

11 lines (10 loc) 375 B
/** * @description Checks if token is of $type `gradient` * @param token [TransformedToken](https://github.com/amzn/style-dictionary/blob/main/types/TransformedToken.d.ts) * @returns boolean */ export const isGradient = (token) => { var _a; const typeValue = (_a = token.$type) !== null && _a !== void 0 ? _a : token.type; return typeValue === 'gradient'; };