{"id":22744122,"url":"https://github.com/mehradi-github/ref-react-storybook","last_synced_at":"2025-06-14T17:34:22.802Z","repository":{"id":254266082,"uuid":"845596896","full_name":"mehradi-github/ref-react-storybook","owner":"mehradi-github","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-03T09:05:37.000Z","size":1053,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T04:43:21.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mehradi-github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-21T14:51:39.000Z","updated_at":"2024-10-03T09:05:41.000Z","dependencies_parsed_at":"2024-08-26T10:31:46.288Z","dependency_job_id":"7d153e58-249d-4416-a2c9-34ca64380935","html_url":"https://github.com/mehradi-github/ref-react-storybook","commit_stats":null,"previous_names":["mehradi-github/ref-react-storybook"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mehradi-github/ref-react-storybook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehradi-github%2Fref-react-storybook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehradi-github%2Fref-react-storybook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehradi-github%2Fref-react-storybook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehradi-github%2Fref-react-storybook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehradi-github","download_url":"https://codeload.github.com/mehradi-github/ref-react-storybook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehradi-github%2Fref-react-storybook/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259855654,"owners_count":22922354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-11T01:39:54.214Z","updated_at":"2025-06-14T17:34:22.777Z","avatar_url":"https://github.com/mehradi-github.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React + TypeScript + Vite + Storybook\n\n- [React + TypeScript + Vite + Storybook](#react--typescript--vite--storybook)\n  - [Prerequisites](#prerequisites)\n    - [Git hooks](#git-hooks)\n    - [Emmet](#emmet)\n    - [Storybook](#storybook)\n      - [storybook/addon-designs](#storybookaddon-designs)\n      - [Embedding Figma designs via Figspec](#embedding-figma-designs-via-figspec)\n\n## Prerequisites\n\n### Git hooks\n\nInstall husky and lint-staged via [Git hooks](https://prettier.io/docs/en/install#git-hooks):\n\n```sh\nnpm config set legacy-peer-deps true\n# npm init @eslint/config@latest\nnpm i -D --save-exact prettier\nnpm i -D husky lint-staged\nnpx husky init\nnode --eval \"fs.writeFileSync('.husky/pre-commit','npx lint-staged\\n')\"\n\n```\n\n### [Emmet](https://github.com/mehradi-github/ref-react#emmet)\n\n### Storybook\n\n```sh\nnpx storybook@latest init\n\nnpm i styled-components\n\n```\n\n#### storybook/addon-designs\n\n[A Storybook addon that embed Figma](https://storybook.js.org/addons/@storybook/addon-designs) or websites in the addon panel for better design-development workflow.\n\n```sh\n npx install @storybook/addon-designs\n```\n\n#### Embedding Figma designs via Figspec\n\nYou can embed Figma files or frames with enhanced spec viewer ([Figspec](https://storybookjs.github.io/addon-designs/?path=/docs/docs-figma-figspec-readme--docs)) with figspec type. The addon calls Figma API with provided Figma Token and renders your Figma files or frames using Figspec components with the result.\n\n```js\nexport const myStory = () =\u003e \u003cMyComponent /\u003e;\n\nmyStory.parameters = {\n  design: {\n    type: \"figspec\",\n    url: \"\u003cYOUR_FIGMA_ITEM_URL\u003e\",\n    accessToken: \"\u003cYOUR_FIGMA_ACCESS_TOKEN\u003e\",\n  },\n};\n```\n\nFigma Personal [Access Token](https://www.figma.com/developers/api#access-tokens).\n\n```sh\n STORYBOOK_FIGMA_ACCESS_TOKEN=xxxx npm run storybook\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehradi-github%2Fref-react-storybook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehradi-github%2Fref-react-storybook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehradi-github%2Fref-react-storybook/lists"}