{"_id":"@bomihooks/use-tabs","_rev":"1-69e2740a78ad34c071abfc37972c7fcd","name":"@bomihooks/use-tabs","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bomihooks/use-tabs","version":"1.0.0","description":"React Hook to implement tab","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/BomiChoi/Bomihooks.git"},"keywords":["react","hooks","tab"],"author":{"name":"Bomi Choi","email":"hibomi97@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/BomiChoi/Bomihooks/issues"},"homepage":"https://github.com/BomiChoi/Bomihooks#readme","_id":"@bomihooks/use-tabs@1.0.0","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-ehjZh8R/9Ql72OZ2y33phWWGFlcU+2avxiofi5vM+metV6vhAfln21aX83bdntYjlUR/5XuI+/KmszDjaMAQPA==","shasum":"e954e168cb2d2ea20e47fc4ff9845f61e5f39b74","tarball":"https://registry.npmjs.org/@bomihooks/use-tabs/-/use-tabs-1.0.0.tgz","fileCount":3,"unpackedSize":1506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGPfDCRA9TVsSAnZWagAAAFgQAIkNn1jq19OTGyXweJO1\nAPUisOCmDcKo75//Iq/A/9mHhAzfbgyr8myYwc6CX4+4hKLRiHqxFsACP3U+\nAxGkMpMgHAj6L0scfXmH56TnPe0u/E1fM9jT7rLF1C18NAF3uV5at7mc0Ip5\n6K216q3EX3hLk4mx5a4qwaHnhOh4OA5kv0mAR+1hHOAprgvVEE2tKHDz8hPe\narP2mqXfB/pmNGWKgIKDuM9CgXGXIKHVqeIuZLoSSHLZ1FE0EQ8rC6NG0MlZ\nV0u1MGZpz2LKssfv8KhTJd/pJ3jLOoM7yfbDZzzxQXGwOMevPRRxDHGuM8aM\nmze2vw8MiyDpUhRGb5cGGiK7mIsBzADCb/l6tu+Oh7zOvPaDt/KEX0n0Ecs/\nMi1uXxqCCyF/SuiNbb5t5k+xBcZltM8K/wQimz0OtXKG3VCYhJSk9i3jp+qY\niAIdWZa12n1gk2iIESzPHkr1XSQ6oG+uxsYHiJfpJtYIBQRs4EfXGrPMzK11\nRW5Wv/Z2dsG9tCibBX04LTINZ6Zayi1CBGKkCunsW+CS4F4XDIZaVgdHibpQ\npnO+RrfbPsCsXq/CeUnsr0FOHl+T+yhaYF/6Fa5jV0h/J79+WSa5RjYlDBJD\nYXm7J1JiZAa/qe8T3DobTPzxmmRz1+kl1B2InxPPGadEGfIpFzp/EN4vAgKF\nE75T\r\n=XagR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIERwEH70ZcXKFfiw8xT+hSzcDIFtIk3uLXPlzmYO8E2kAiEA0AIgdi8hKXtTsFBdMYy0s+srbHhnNr2Lx/aR2vH04Zo="}]},"_npmUser":{"name":"hibomi97","email":"hibomi97@gmail.com"},"directories":{},"maintainers":[{"name":"hibomi97","email":"hibomi97@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-tabs_1.0.0_1629026243348_0.7232384223478905"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-15T11:17:23.279Z","1.0.0":"2021-08-15T11:17:23.486Z","modified":"2022-04-04T20:04:58.621Z"},"maintainers":[{"name":"hibomi97","email":"hibomi97@gmail.com"}],"description":"React Hook to implement tab","homepage":"https://github.com/BomiChoi/Bomihooks#readme","keywords":["react","hooks","tab"],"repository":{"type":"git","url":"git+https://github.com/BomiChoi/Bomihooks.git"},"author":{"name":"Bomi Choi","email":"hibomi97@gmail.com"},"bugs":{"url":"https://github.com/BomiChoi/Bomihooks/issues"},"license":"MIT","readme":"# @bomihooks/use-tabs\n\nReact Hook to implement tab<br>\nExample\n```javascript\nimport { useTabs } from \"@bomihooks/use-tabs\";\n\nconst content = [\n  {\n    tab: \"Section 1\",\n    content: \"I'm the content of the Section 1\"\n  },\n  {\n    tab: \"Section 2\",\n    content: \"I'm the content of the Section 2\"\n  }\n];\n\nexport default function App() {\n  const { currentItem, changeItem } = useTabs(0, content);\n  return (\n    <div className=\"App\">\n      {content.map((section, index) => (\n        <button onClick={() => changeItem(index)}>{section.tab}</button>\n      ))}\n      <div>{currentItem.content}</div>\n    </div>\n  );\n}\n```","readmeFilename":"README.md"}