How to use the @twilio-paste/theme.ThemeVariants.SENDGRID function in @twilio-paste/theme

To help you get started, we’ve selected a few @twilio-paste/theme 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 twilio-labs / paste / packages / paste-website / src / components / tokens-list / index.tsx View on Github external
const getTokensByTheme = (theme: ThemeVariants, props: TokensListProps): TokenCategory[] => {
  let tokens = [] as TokenCategory[];
  if (theme === ThemeVariants.CONSOLE) {
    if (props.consoleTokens != null) {
      // eslint-disable-next-line prefer-destructuring
      tokens = props.consoleTokens[0].node.tokens;
    }
  }
  if (theme === ThemeVariants.SENDGRID) {
    if (props.sendgridTokens != null) {
      // eslint-disable-next-line prefer-destructuring
      tokens = props.sendgridTokens[0].node.tokens;
    }
  }
  if (theme === ThemeVariants.DEFAULT) {
    if (props.defaultTokens != null) {
      // eslint-disable-next-line prefer-destructuring
      tokens = props.defaultTokens[0].node.tokens;
    }
  }
  return tokens;
};
github twilio-labs / paste / packages / paste-website / src / components / ThemeSwitcher.tsx View on Github external
borderWidth="borderWidth10"
      padding="space10"
    >
      
        Change the site theme
        
        Console
        
        SendGrid
        
        Paste

@twilio-paste/theme

Paste Design System Theme Package which provides support for APIs to theme UIs and components.

MIT
Latest version published 6 days ago

Package Health Score

66 / 100
Full package analysis

Similar packages