kdg-react
v1.43.12
Published
The official KDG reusable React component library
Readme
Install the package via NPM
- Install dependencies
- Use Node version 16.20.0 or later.
- Install the package
npm install kdg-react
Testing locally with npm link
- Build and package the library package with
npm run pack - Run
npm linkin the root folder - Inside your application, run
npm link kdg-react - Rebuild the library with
npm run packafter making any changes
Testing and installing via .zip/.tgz
- Package the library with
npm run pack - An exported .tgz of the current version will be created at
./pkgto be added to your project - Add this .tgz to your application and reference it in
package.jsonviafile:/path-to-file.tgz
Contributing
- Build at test your changes by following the testing steps above
- Spin up the local storybook server with
npm run dev - Update applicable component stories at
/src/stories - Create a PR at KDG-React
Running with Docker
- To start Storybook using Docker, run:
docker-compose up - Access the Storybook interface at
http://localhost:6006 - Changes to your component files will automatically be reflected in the Storybook interface
Additional Notes
Internal onclick events should be wrapped with the
handleOnClickfunction located at/src/utils/Commonto ensure event bubbling and propagation is standardized (WrappedClickable/src/components/Clickablecan be substituted when a mouse event is unavailable)You may need to include the CoreUI CSS in your application
import '@coreui/coreui-pro/dist/css/coreui.min.css'
