Edit the placeholder name in index.tsx file with your package/component name. You can do this in vscode by using the find and replace feature. Find 'PackageName' and replace it with you component name. Remember to use PascalCase because it is a react component.
Edit the placeholder name in package.json file and readme file. You can do this in vscode by using the find and replace feature. Find 'package-name' and replace it with you component name. We recommend using hyphenated names like 'package-name' instead of other formats like camelCase or spaced names like 'packageName' or 'package name'.
Edit the publish.yml file in the .github/workflows folder to add your email and name. Replace '[email protected]' with your email and 'Benedict Steven' with your name.
Add NPM_AUTH_TOKEN and github TOKEN in the settings of your package repository in the github UI. You can find instrutions on how to generate NPM_AUTH_TOKEN here and github TOKEN here.
Remember to add your component's features and props in this README.md file below the instructions.
Remove the instructions from this README.md file.
- List of features
npm install @flexcodelabs/package-name
or
yarn add @flexcodelabs/package-name
...
import PackageName from '@flexcodelabs/package-name';
<
PackageName {
...props
}
/>
Name | Type | Default | Required | Description |
---|---|---|---|---|
Prop | type |
`` | false | Descriptions |