Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup
Few easy steps. Let's start!
nvm use 18
npm i
npm run sb
Prepare your environment
npx playwright install
npm run sb # in the first terminal tab
npm run test:ui # in the second terminal tab
or
npm run test:unit
Build and link the library
npm link
npm link @pathliving/components
Pay attention! Do not attempt to use it in 'server components'. The Button component can only be used in 'client components' because it has event handlers
import { Button } from '@pathliving/components';
export default function Page() {
return (
<>
Home page
<Button onClick={() => alert('Hi!')}>Click me!</Button>
</>
);
}
Hi! My name is Andrii, and I'm a Front-end engineer with 4 years of experience. You can find the details of my resume at this link. However, I decided to be less verbose and instead focus on writing as much as possible within one working day to submit for your review. You can see the list of completed tasks in the Git commit history, but trust me, it was a journey from the "npx storybook@latest init" command to "git push origin HEAD" (link to github repo). Most of the errors and issues encountered along the way were resolved, though there is always room for improvement. Please be generous with your feedback ;) Have a peaceful day!