Add this to your .npmrc
:
@tjikko-studio:registry=https://npm.pkg.github.com
Then run:
npm i @tjikko-studio/components
Import the components you want and use them as you wish by passing in props.
import {FAQ} from '@tjikko/components'
export default function ReactComponent () {
return (
<FAQ {...faqProps} />
)
}
If development needs to happen in parallel here and in a consumer, it can be helpful to npm link
the repos together (docs).
In the consumer repo, after installing the dependencies:
npm link ../path/to/components/repo
Publishing a release on GitHub is enough for consumers to be able to get a specific version of the library, just don't forget to use npm version
(docs) before trying to publish a new release!