{"id":17241841,"url":"https://github.com/pvinis/react-conditional-wrap","last_synced_at":"2026-04-29T08:02:07.854Z","repository":{"id":246603778,"uuid":"821612936","full_name":"pvinis/react-conditional-wrap","owner":"pvinis","description":"A simple component that helps you easily wrap components with other components, conditionally.","archived":false,"fork":false,"pushed_at":"2026-01-28T14:30:09.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-29T06:12:10.992Z","etag":null,"topics":["conditional-rendering","react","wrap"],"latest_commit_sha":null,"homepage":"https://jsr.io/@pvinis/react-conditional-wrap","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pvinis.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-06-29T00:43:12.000Z","updated_at":"2026-01-28T14:30:28.000Z","dependencies_parsed_at":"2024-06-29T02:23:12.172Z","dependency_job_id":"dc39dc08-5095-4ce5-8b51-b1b7fecaa168","html_url":"https://github.com/pvinis/react-conditional-wrap","commit_stats":null,"previous_names":["pvinis/react-conditional-wrap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pvinis/react-conditional-wrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvinis%2Freact-conditional-wrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvinis%2Freact-conditional-wrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvinis%2Freact-conditional-wrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvinis%2Freact-conditional-wrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvinis","download_url":"https://codeload.github.com/pvinis/react-conditional-wrap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvinis%2Freact-conditional-wrap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32416146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["conditional-rendering","react","wrap"],"created_at":"2024-10-15T06:11:33.320Z","updated_at":"2026-04-29T08:02:07.837Z","avatar_url":"https://github.com/pvinis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-conditional-wrap\n\nA simple component that helps you easily wrap components with other components, conditionally.\n\n\n## Installation\n\n```sh\nnpm install @pvinis/react-conditional-wrap\nor\nnpx jsr add @pvinis/react-conditional-wrap\n```\n\n## Usage\n\n- Anything inside `Wrap.Content` will always be rendered.\n- Anything between `Wrap` and `Wrap.Content` will only be rendered if the `if` prop is `true`.\n\n```jsx\nimport { Wrap } from 'react-conditional-wrap'\n\nfunction MyComponent() {\n  const [show, setShow] = useState(true)\n\n  return (\n    \u003cWrap if={show}\u003e\n      \u003cdiv style={{ backgroundColor: \"pink\" }}\u003e\n        \u003cWrap.Content\u003e\n          \u003cdiv\u003eHello World\u003c/div\u003e\n        \u003c/Wrap.Content\u003e\n      \u003c/div\u003e\n    \u003c/Wrap\u003e\n  )\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvinis%2Freact-conditional-wrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvinis%2Freact-conditional-wrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvinis%2Freact-conditional-wrap/lists"}