How to use the @carbon/type.scale 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
return (
    <article>
      <header>
        <h2 id="type-scale">Scale</h2>
      </header>
      <p>Used for deriving a type scale value for a given step.</p>
      
          {CarbonType.scale.map((size, step) =&gt; (
            
          ))}
        <table>
        <thead>
          <tr>
            <th>Step</th>
            <th>px</th>
            <th>Actual size</th>
          </tr>
        </thead>
        <tbody><tr>
              <td>{step + 1}</td>
              <td>{size}</td>
              <td>
                Good design is good business
              </td>
            </tr></tbody>
      </table>
    </article>
  );
}

@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