UI Components for Parliament projects
You can install the package using a package manager like npm or yarn.
yarn add @adobe/parliament-ui-componentsimport React from 'react'
import { Heading1, Footer } from '@adobe/parliament-ui-components'
const Example = ({ title }) => {
return (
<>
<Heading1>{title}</Heading1>
<div>Hello world!</div>
<Footer />
</>
)
}and don't forget to import the packages styles from @adobe/parliament-ui-components/dist/index.css.
yarn installyarn testThis project uses [Storybook][http://storybook.js.org/] for testing the look and behavior of its UI components.
yarn storybookIf you want to do concurrent development of this project while it is a dependency of another project you can accomplish it by using yarn link and following these steps.
This will register @adobe/parliament-ui-components, react and react-dom so they can be used in other local projects. It will also avoid the invalid hook call warning.
yarn link
cd node_modules/react
yarn link
cd ../react-dom
yarn linkyarn run startNow any changes you make in this project will automatically be built.
Go to the root directory of your sibling project and run the following commands:
yarn link react
yarn link react-dom
yarn link @adobe/parliament-ui-componentsNow when you run your sibling project it will use the local copy of @adobe/parliament-ui-components that you can edit on the fly. Again, avoiding the invalid hook call warning.
When you no longer want to use the local copy of @adobe/parliament-ui-components you can revert back to the published package by following these steps.
In your sibling project run:
yarn unlink react
yarn unlink react-dom
yarn unlink @adobe/parliament-ui-components
yarn install --forceThis will return your project to the state when you did a yarn install.
TODO
Contributions are welcomed! Read the Contributing Guide for more information.
This project is licensed under the Apache V2 License. See LICENSE for more information.