1.0.4 • Published 2 years ago

@tracer-protocol/tracer-ui v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Tracer UI Component Library

Overview

This codebase exists as the component library for the Tracer ecosystem. All components in this library are built based on Atomic Design principles, and published as an npm package.

Contribution Guide

Getting Started

Installation

To use this package in a React app, install the npm package:

npm install @tracer-protocol/tracer-ui

Or with yarn:

yarn add @tracer-protocol/tracer-ui

Tracer Theme

Setup

All of these components are built with the styled-components library, and use a global theme, which needs to be added to your app. At the top level of your React app, add the theme provider.

import { ThemeProvider } from "@tracer-protocol/tracer-ui";

const MyApp = () => {
    return (
        <ThemeProvider>
            // The rest of your app
        </ThemeProvider>
    )
}

If you are using styled components, this will also give you access to the Tracer theme to use in your components.

const MyStyledComponent = styled.div`
  color: ${(props) => props.theme.colors.text.primary};
  font-family: ${(props)  => props.theme.fontFamily.heading};
`;

TypeScript

To get TypeScript to recognize the Tracer theme, add the module to your type declaration file:

// global.d.ts
import "styled-components";
import { TracerTheme } from "@tracer-protocol/tracer-ui";

declare module "styled-components" {
    export interface DefaultTheme extends TracerTheme {}
}
1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

0.13.4

2 years ago

0.12.0

2 years ago

0.13.0

2 years ago

0.13.1

2 years ago

0.13.2

2 years ago

0.13.3

2 years ago

0.11.2

2 years ago

0.11.1

2 years ago

0.10.0

2 years ago

0.11.0

2 years ago

0.10.1

2 years ago

0.10.2

2 years ago

0.8.4

2 years ago

0.1.0

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.9.0

2 years ago

0.8.1

2 years ago

0.8.0

2 years ago

0.8.3

2 years ago

0.9.1

2 years ago

0.8.2

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.0.1

2 years ago