{"_id":"@am-hooks/use-tab","_rev":"1-9598df165428b62a3c829abb8f10df62","name":"@am-hooks/use-tab","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@am-hooks/use-tab","version":"1.0.0","description":"Show only the content of the currently selected section","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/dorothy7964/am-hooks.git"},"keywords":["tab"],"author":{"name":"wooami"},"license":"MIT","bugs":{"url":"https://github.com/dorothy7964/am-hooks/issues"},"homepage":"https://github.com/dorothy7964/am-hooks#readme","_id":"@am-hooks/use-tab@1.0.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-YCcPL2Keny85Q8xDOYS7iT6AVPIt4CYzooVQSHhvTiUIG2R2UPTpiGLXNDVcsg21IoHbN7eLkIlpg+QaWv8FRg==","shasum":"e35acd84873bc5ea55fb835275dea38a0ed142e7","tarball":"https://registry.npmjs.org/@am-hooks/use-tab/-/use-tab-1.0.0.tgz","fileCount":4,"unpackedSize":1653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZ+AmCRA9TVsSAnZWagAApHIQAIbODkFpAg9C+7ah633L\nGpfp5NUSitO/sloq1GmRvZmmroIyTDBUz4IGzD+Hc+E+Du16h+PxpiKFQC+U\nDXYIncazl6WgkKMbt0V41QTl2qo9uqySpSu3RMbz+3WauSMEIjD4gEVbm8VZ\n+jPKqiPy5PvdJjGD4d0++6Dhl00cMZWr/1uz7r2447PpwqN94DwTZkc/3Kei\noJNxas2X1CQLDbM4WFwuG6SX+t00ANbBE5qKEQ792kBZKh0EeqSsu3YMvS2I\nivfU0fZGZwrVwgqevlPcHATIZb5/KfMIgghXPyq36ILytwWbLmMF3nDOGq57\niwT8sywWwBo6MnU26jCFxRe+DkLmfHlr/ZWTwgp9C1LCQtQgWRCaOEY2SraQ\nB/5C1SGjyFdBs9Y/KXspnBmcxs+y1Do8cRrC1dfksg++ElTzjalROg/Xqw9h\n+veE0EdECG1b/CHdMj4/pSZtMhKcs80HTC2mrhQeNqk1v2tljY2sBT+sYpKo\neI6lHdSYW93+07/Ngq++GcWB+03NLoBswDLvbTifeXQvG7qP4+pgW86tCHd6\nnDEpcIkczL6fQ43fzs80dmzS+H5Q+IDEi4CoKr4rnNyKLTgwdOhnu2xH7BiE\nld4plQR2Lllc6POUvL3pg0zMmiH+16ciddMWp6Aibzq6HpoAzAc8xtoNH9UM\nObx4\r\n=UIQ3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFVwYZ532qPbcaq0CUtefAi1V/gDde7N6+JJXprVhP4TAiBLN2R0XwNUJLsVwouhZ30orNCMSm/BlYecIyuVodGSKA=="}]},"maintainers":[{"name":"wam-6577","email":"wam6577@gmail.com"}],"_npmUser":{"name":"wam-6577","email":"wam6577@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-tab_1.0.0_1583865894121_0.6769721403593048"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-10T18:44:53.760Z","1.0.0":"2020-03-10T18:44:54.227Z","modified":"2022-04-04T13:42:29.834Z"},"maintainers":[{"name":"wam-6577","email":"wam6577@gmail.com"}],"description":"Show only the content of the currently selected section","homepage":"https://github.com/dorothy7964/am-hooks#readme","keywords":["tab"],"repository":{"type":"git","url":"git+https://github.com/dorothy7964/am-hooks.git"},"author":{"name":"wooami"},"bugs":{"url":"https://github.com/dorothy7964/am-hooks/issues"},"license":"MIT","readme":"# useTab\r\n현재 선택한 Section 의 content 만 보여주기 <br><br>\r\n\r\n## Installation\r\n\r\n#### yarn\r\n\r\n`yarn add @am-hooks/use-tab`\r\n\r\n#### npm\r\n\r\n`npm i @am-hooks/use-tab` <br><br>\r\n\r\n## Usage\r\n\r\n```js\r\nimport useTitle from \"@am-hooks/use-tab\";\r\n\r\nconst App = () => {\r\n  const content = [\r\n    {\r\n      tab: \"Secton 01\",\r\n      content: \"Secton 01 Content\"\r\n    },\r\n    {\r\n      tab: \"Secton 02\",\r\n      content: \"Secton 02 Content\"\r\n    }\r\n  ];\r\n  const { currentItem, changeItem } = useTabs(0, content);\r\n\r\n  return (\r\n    <>\r\n      <h2>useTab</h2>\r\n      {content.map((sectoin, index) => (\r\n          <button onClick={() => changeItem(index)}>{sectoin.tab}</button>\r\n      ))}\r\n      <div>{currentItem.content}</div>\r\n    </>\r\n  )\r\n}\r\n```\r\n\r\n<br><br>\r\n","readmeFilename":"README.md"}