/

Use with Next.js


Add following dependencies to your project:

$ yarn add -D next-transpile-modules next-images

Update your next.config.js to look like this:

// /next.config.js
const withImages = require('next-images')
const withTM = require('next-transpile-modules')([
  'styled-components',
  'insites-ui'
])

module.exports = withImages(withTM())

And your _app.js to look like this:

// /pages/_app.js
import { ThemeProvider, theme } from 'insites-ui'
import 'typeface-inter'

export default function CustomApp({ Component, pageProps }) {
  return (
    <ThemeProvider theme={theme}>
      <Component {...pageProps} />
    </ThemeProvider>
  )
}
Edit on GitHub