Skip to content

island-is/island-ui-next-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ Disclaimer! The @island.is/ui library is not officially release and is only available as an alpha version at the moment. We are going to improve it and provide a better support in the future. Proceed with cautious, things might break.

Setup

  1. Create a new next app
npx create-next-app
  1. Set up TypeScript
touch tsconfig.json
yarn add --dev typescript @types/react @types/node
  1. Install @island.is/ui
yarn add @island.is/ui -E

Install its required peerDependencies

yarn add @rehooks/component-size animejs classnames date-fns downshift hypher lodash markdown-to-jsx react react-animate-height react-datepicker react-dropzone react-keyed-flatten-children react-select react-toastify react-use reakit [email protected] -E

Make sure to install [email protected]. It won't work with treat@2.

  1. Configure next.config.js

We need to use specific versions of webpack and next that are supported by Treat.

yarn add [email protected] -E
yarn add [email protected] next-treat next-transpile-modules -DE

Create a next.config.js at the root of the project and add the following.

const withTreat = require('next-treat')();
const withTM = require('next-transpile-modules')(['@island.is/ui']);

module.exports = withTreat(withTM());
  1. Run the development server
yarn dev

You can now open http://localhost:3000

  1. Voilà!

preview

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published