{"id":17303901,"url":"https://github.com/gergelyke/codelabs-react","last_synced_at":"2025-04-14T13:11:16.984Z","repository":{"id":53514003,"uuid":"321099266","full_name":"gergelyke/codelabs-react","owner":"gergelyke","description":"A bring-your-own-styles React library that turns Google Codelabs into React components","archived":false,"fork":false,"pushed_at":"2021-03-26T15:31:17.000Z","size":713,"stargazers_count":8,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T02:14:04.173Z","etag":null,"topics":["codelab","react"],"latest_commit_sha":null,"homepage":"https://codelabs-react.netlify.app","language":"JavaScript","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/gergelyke.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}},"created_at":"2020-12-13T15:41:03.000Z","updated_at":"2024-07-09T06:42:50.000Z","dependencies_parsed_at":"2022-09-12T01:52:23.901Z","dependency_job_id":null,"html_url":"https://github.com/gergelyke/codelabs-react","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergelyke%2Fcodelabs-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergelyke%2Fcodelabs-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergelyke%2Fcodelabs-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergelyke%2Fcodelabs-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gergelyke","download_url":"https://codeload.github.com/gergelyke/codelabs-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886325,"owners_count":21177643,"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":["codelab","react"],"created_at":"2024-10-15T11:51:37.426Z","updated_at":"2025-04-14T13:11:16.402Z","avatar_url":"https://github.com/gergelyke.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codelabs-react\n\nA bring-your-own-styles React library, that turns [Google-style codelabs](https://github.com/googlecodelabs/tools/blob/master/FORMAT-GUIDE.md) into React components for easy customization.\n\nYou'll need to get the API response from the Google APIs yourself. This project does not handle authentication to the Google APIs. Check out [this guide](https://developers.google.com/docs/api/quickstart/js) if you need help with it.\n\n**Live demo:**\n\n- [With the default components](https://codelabs-react.netlify.app/?path=/story/codelabs-example--default)\n- [With overrides using Base Web](https://codelabs-react.netlify.app/?path=/story/codelabs-example--base-web)\n\n## API\n\n```js\nimport { Codelabs } from \"codelabs-react\";\n\n/*\n    source: the JSON output of the Google Docs API\n    overrides: providing your own set of render functions or component overrides\n*/\n\u003cCodelabs\n  // required, full API response from https://docs.googleapis.com/v1/documents/{documentId}\n  // has a shape like: {title, body : {content}, inlineObjects}\n  content={content}\n  // optional, if your app needs to know about a page change\n  onPageChange={({ nextPage }) =\u003e {}}\n  // optional, if you want to set the initial page to show\n  initialPage={Number}\n  // optional, if you want to use iframes, you have to define the allowed base URLs, like 'google.com'\n  iframeSourceUrls={[String]}\n  // optional, used for styling\n  overrides={{\n    // Layout overrides\n    Header: ({ title }) =\u003e React.Component,\n    Content: ({ children }) =\u003e React.Component,\n    SideNavigation: ({ items, setPage, currentPage, onPageChange }) =\u003e\n      React.Component,\n    Button: ({ children }) =\u003e React.Component,\n\n    // Text overrides\n    Paragraph: ({ children }) =\u003e React.Component,\n    H1: ({ children }) =\u003e React.Component,\n    H2: ({ children }) =\u003e React.Component,\n    H3: ({ children }) =\u003e React.Component,\n    H4: ({ children }) =\u003e React.Component,\n    H5: ({ children }) =\u003e React.Component,\n    H6: ({ children }) =\u003e React.Component,\n    Paragraph: ({ children }) =\u003e React.Component,\n    ListItem: ({ children }) =\u003e React.Component,\n\n    // Info and warning boxes\n    InfoBox: ({ children }) =\u003e React.Component,\n    WarningBox: ({ children }) =\u003e React.Component,\n\n    // Link overrides\n    ButtonLink: ({ children, href }) =\u003e React.Component,\n    Link: ({ children, href }) =\u003e React.Component,\n\n    // Code containers\n    // Snippet: single-line\n    // Box: multi-line\n    Snippet: ({ children }) =\u003e React.Component,\n    CodeBox: ({ children }) =\u003e React.Component,\n\n    // image / video components\n    Img: ({ src }) =\u003e React.Component,\n    IFrame: ({ src }) =\u003e React.Component,\n  }}\n/\u003e;\n```\n\n## Roadmap\n\nCurrently, the following features are missing, and will be added in the future:\n\n- [x] Image support\n- [x] YouTube support\n- [ ] Per-step time estimation\n- [ ] Feedback links\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgergelyke%2Fcodelabs-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgergelyke%2Fcodelabs-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgergelyke%2Fcodelabs-react/lists"}