Usage with Create React App
To get started using Pivotal UI with Create React App (CRA), follow these steps:
-
Install the latest version of Node LTS. See here for instructions.
-
Create a new CRA project with this command:
npx create-react-app some-directory
At this point, you'll be able to start up the default CRA app locally:
cd some-directory
yarn start
For more information on Create React App, see the CRA readme.
- Install the
pivotal-ui
node module:
yarn add pivotal-ui
- Open
src/App.js
and replace the contents with:
import React, {Component} from 'react';
import {DefaultButton} from 'pivotal-ui/react/buttons';
export default class App extends Component {
render() {
return <DefaultButton>Click Me</DefaultButton>
}
}
Sass
Please refer to the create-react-app docs