How to use the @shopify/polaris-tokens.colorWhite function in @shopify/polaris-tokens

To help you get started, we’ve selected a few @shopify/polaris-tokens examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Shopify / polaris-react / src / utilities / theme / utils.ts View on Github external
export function setTextColor(
  name: string,
  variant: 'light' | 'dark' = 'dark',
): string[] {
  if (variant === 'light') {
    return [name, tokens.colorInk];
  }

  return [name, tokens.colorWhite];
}

@shopify/polaris-tokens

[![npm version](https://img.shields.io/npm/v/@shopify/polaris-tokens.svg?style=flat)](https://www.npmjs.com/package/@shopify/polaris-tokens)

SEE LICENSE IN LICENSE.md
Latest version published 3 months ago

Package Health Score

98 / 100
Full package analysis

Similar packages