@dfx.swiss/react-components
v1.3.2
Published
React UI components for DFX.swiss
Readme
React Components
React UI components for DFX.swiss
Testing package modifications using npm link
To test the components in a project, you can use npm link to link the local package to the project.
- To avoid conflicts with the package name, you can change the package name in the
package.jsonfile, e.g. to 'react-components-local' - Build the packages using
npm run buildin the root directory. - Link the package using
npm linkin the package directory, i.e.cd packages/react-components && npm link. - In the project where you want to test the package, link the package using
npm link <package-name>, i.e.npm link react-components-local. - Import the component in the project using the package name, e.g.
import { StyledTabContentWrapper } from 'react-components-local'. - To unlink the package, use
npm unlink <package-name>.
Note that at any time you can view linked packages using npm ls --global --depth=0 --link=true.
When you're done, remember to revert the package name in the package.json file.
