How to use the @carbon/type.styles function in @carbon/type

To help you get started, we’ve selected a few @carbon/type 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 carbon-design-system / carbon / packages / type / examples / preview / index.js View on Github external
{fontFamilies.map(({ dir, title }) => (
              
            ))}
          
          {Object.keys(CarbonType.styles).map(token => (
            
              {fontFamilies.map(({ dir, fontFamily, title, sample }) => (
                <table>
        <thead>
          <tr>
            <th>Token</th>
            <th>Sample</th><th dir="==" style="{{">
                {title}
              </th></tr>
        </thead>
        <tbody><tr>
              <td>
                <pre>                  <code>{formatTokenName(token)}</code>
                </pre>
              </td>
              <td>
                <span>Text sample</span>
              </td><td dir="{dir}" style="{{">
                  <span>{sample}</span></td></tr></tbody></table>

@carbon/type

Typography for digital and software products using the Carbon Design System

Apache-2.0
Latest version published 7 days ago

Package Health Score

95 / 100
Full package analysis

Popular @carbon/type functions