Introduction
Axis is a theme-based component library that is fully responsive and extensible.
Installation
Use npm or yarn:
$ yarn add @theise3107/axis
Use ThemeProvider
to wrapper all of the styled-components to provide the theme as prop:
import React from 'react'
import { ThemeProvider } from '@therise3107/axis'
import theme from 'styles/theme'
const app = ({ children }) => (
<ThemeProvider theme={theme}>
{children}
</ThemeProvider>
)
Use styled-components in your pages
import React from 'react'
import { Row, Column, Container, Heading, Text } from '@therise3107/axis'
const home = () => (
<Container>
<Row>
<Column>
<Heading>Cats 🐱</Heading>
<Text>Cats are planning global invasion!</Text>
</Column>
<Column>
<Heading>Dogs 🐶</Heading>
<Text>Dogs are here to the rescue!</Text>
</Column>
</Row>
</Container>
)
Last updated
Was this helpful?