Socket
Book a DemoInstallSign in
Socket

@weave-design/typography

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@weave-design/typography

Weave Typography components

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
2
Created
Source

Typography

The Typography components apply the Artifakt typeface to text.

Getting started

yarn add @weave-design/typography @weave-design/theme-context @weave-design/theme-data
yarn add @weave-design/fonts

Import the component and CSS

import Typography from '@weave-design/typography';
import "@weave-design/fonts/build/ArtifaktElement.css";

Basic usage

<Typography>Artifakt Element is the preferred font.</Typography>

Styling

Use the className prop to pass in a css class name to the outermost container of the component. The class name will also pass down to most of the other styled elements within the component.

Typography also has a stylesheet prop that accepts a function wherein you can modify its styles. For instance

import Typography from '@weave-design/typography';

function YourComponent() {
  // ...
  const customStylesheet = (styles, props, themeData) => ({
    ...styles,
    typography: {
      ...styles.typography,
      color: themeData["colorScheme.errorColor"]
    }
  });

  return (
    <Typography stylesheet={customStylesheet} />
  );
}

FAQs

Package last updated on 23 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts