govil-card
v1.0.4
Published
A govil card - linkable aread with optional image and text, optiosn for model - class names to extend view
Downloads
1
Readme
govil-strip-services-cards
A simple React component that displays boxes of links with icons inside
How to use
Clone this repo to your local computer, then run:
npm install && npm run build
To make this component available to other projects on your local computer, run
yarn link
.Then go to the project where you want to use this package and run
yarn link "govil-strip-services-cards"
.
Finally, to fix the multiple copies of React bug that shows up with linked React packages:
- navigate to the root of the
govil-strip-services-cards
package - run
npm link "../path/to/your/project"
You can now import govil-strip-services-cards
as a normal package installed from npm like so:
import SectionIconBoxes from 'govil-strip-services-cards'
...
You can also import the type definitions if you're using TypeScript like so:
import * from 'govil-strip-services-cards'
...
Available props
className: string (optional)
To customise this component, pass in a class name to the className
prop and style that class name in your custom CSS.
// your-component.js
import SectionIconBoxes from 'govil-strip-services-cards'
...
<SectionIconBoxes className="dummy" />
...
This component was built for an article on how to publish a React component as a package to npm.