Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
import React from 'react'
import { ThemeProvider } from '@therise3107/axis'
import theme from 'styles/theme'
const app = ({ children }) => (
<ThemeProvider theme={theme}>
{children}
</ThemeProvider>
)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>
)import React from 'react'
import { Flex, Text } from '@therise3107/axis'
const home = () => (
<Flex>
<Text>Sample text 1</Text>
<Text>Sample text 2</Text>
</Flex>
)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>
)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>
)import React from 'react'
import { Row, Column, Container, Heading, Text } from '@therise3107/axis'
const home = () => (
<Container>
<Row>
<Column md={2}>
<Heading>Cats 🐱</Heading>
<Text>Cats are planning global invasion!</Text>
</Column>
<Column sm={2} md={1}>
<Heading>Dogs 🐶</Heading>
<Text>Dogs are here to the rescue!</Text>
</Column>
</Row>
</Container>
)const fontSize = {
xxl: '2.5rem',
xl: '2rem',
xlg: '1.8rem',
lg: '1.6rem',
md: '1.4rem',
sm: '1.2rem',
xsm: '1rem',
xs: '0.8rem',
xxs: '0.7rem'
}
const fontWeight = {
light: 300,
normal: 400,
bold: 500,
bolder: 700
}
const lineHeight = {
comfort: '1.6em',
cozy: '1.4em',
compact: '1em',
}
const letterSpacing = {
comfort: '1.6em',
cozy: '1.4em',
compact: '1em',
}
const fonts = {
primaryFont: 'Avenir, sans-serif',
secondaryFont: 'open sans'
}
const typography = {
heading: {
fontFamily: fonts.primaryFont,
fontSize: fontSize.lg,
fontWeight: fontWeight.normal,
lineHeight: 1.2
},
primary: {
fontFamily: fonts.primaryFont,
fontSize: fontSize.xsm,
fontWeight: fontWeight.normal,
lineHeight: 1.2
},
}
// ...other properties
export default Object.freeze({
// ...other properties
fontSize,
fontWeight,
lineHeight,
letterSpacing,
typography,
})Responsive grid components which provides uniformity across different devices and screen sizes.
import React from 'react'
import { Container, Heading } from '@therise3107/axis'
const home = ({ children }) => (
<Container>
{children}
</Container>
)...
const typography = {
heading: {
fontFamily: fonts.primaryFont,
fontSize: fontSize.lg,
fontWeight: fontWeight.normal,
lineHeight: 1.2
},
headingSecondary: {
fontFamily: fonts.secondaryFont,
fontSize: fontSize.lg,
fontWeight: fontWeight.normal,
lineHeight: 1.2
}
}
import React from 'react'
import { Container, Text } from '@therise3107/axis'
import { fontSize } from 'styles/customTheme' // your theme file
const home = () => (
<Container>
<Heading size={fontSize.lg}>Heading h1</Heading>
<Heading as="h2" size={fontSize.md} type="headingSecondary">
Heading h2
</Heading>
</Container>
)...
import { lineHeight } from 'styles/customTheme' // your theme file
const testComponent = () => <Heading density={lineHeight.cozy}>test</Heading> import React from 'react'
import { Container, Heading } from '@therise3107/axis'
import { fontSize } from 'styles/customTheme'
const home = () => (
<Container>
<Heading type="headingSecondary">
This fontSize is coming via typography.headingSecondary.fontSize
</Heading>
<Heading type="headingSecondary" size={fontSize.md}>
This font size is coming via theme.fontSize.md
</Heading>
</Container>
)...
const typography = {
heading: {
fontFamily: fonts.primaryFont,
fontSize: fontSize.lg,
fontWeight: fontWeight.normal,
lineHeight: 1.2
},
headingSecondary: {
fontFamily: fonts.secondaryFont,
fontSize: fontSize.lg,
fontWeight: fontWeight.normal,
lineHeight: 1.2
}
}