Manpower Group project Talent Solutons. This is a React-based component library built in line with the style-guide and designs provided by UNRVLD.
Ensure you have Node v14.21.3 and yarn installed.
Install dependencies:
yarn
To view the component library in StorybookJS:
yarn storybook
It will run on http://localhost:6006/
To build the library for use in a project:
yarn rollup
To use the production library in a project:
-
Extract the library
Extract the dist folder from the build to a location on your machine.
If you are using a npm package repository then skip this step. -
Install the library
From local (relative path):yarn add file:..\relative\path\to\library
Or from local (absolute path):yarn add C:\absolute\path\to\library
Or from npm package repository. -
Include component imports
in MyComponent.js
...
import * as TalentSolutions from 'manpowergroup-talent-solutions';
...
...
return (
<TalentSolutions.Button onClick={() => {}}>
Test button text
</TalentSolutions.Button>
);
- Include CSS imports
A global CSS file should be included in every page to ensure that all styling and static assets are loaded.
in index.js
...
import 'manpowergroup-talent-solutions/index.css';
...
- Update the library
To update the library in the project, re-extract the dist folder and re-run theyarn add {...path...}
command used in step 2.
The library is not currently optimised, and the above process may need to be revised slightly to more efficiently bundle files and static assets.