Skip to content

Commit

Permalink
feat
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinYang11 committed Mar 20, 2023
1 parent 3baabca commit 69ae1b9
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 21 deletions.
158 changes: 141 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "goji_ui",
"version": "1.0.3",
"version": "1.0.4",
"description": "react goji react modal compnents ",
"main": "dist/cjs/index.js",
"modue": "dist/esm/index.js",
Expand All @@ -25,7 +25,6 @@
"url": "https://github.com/RobinYang11/goji.git"
},
"peerDependencies": {
"framer-motion": "^9.0.2",
"react": ">=16.9.0",
"react-dom": ">=16.9.0"
},
Expand Down Expand Up @@ -70,6 +69,7 @@
"webpack-dev-server": "^4.12.0"
},
"dependencies": {
"framer-motion": "^8.5.5",
"@types/uuid": "^9.0.1",
"uuid": "^9.0.0"
}
Expand Down
5 changes: 3 additions & 2 deletions src/components/tab/tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ export default function Tab(props: TabProps) {
const [currentTab, setCurrentTab] = useState(0);

return <div className={`${styles.tab} ${className}`}>
<motion.ul className={styles.title} >
<motion.ul aria-invalid className={styles.title} >
{items?.map((tab, index) => {
return <motion.li
aria-label="tab"
onClick={() => { setCurrentTab(index) }}
key={tab.key}>
{tab.title}
</motion.li>
})}
</motion.ul>
<motion.div {...motionConfig} className={styles.body}>
<motion.div aria-label="tab-content" {...motionConfig} className={styles.body}>
{items?.[currentTab].children}
</motion.div>
</div>
Expand Down

0 comments on commit 69ae1b9

Please sign in to comment.