Navs.js in BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites 3.1.5, at admin/components/Navs.js
| 1 | import React from 'react' |
| 2 | |
| 3 | const Navs = ({ current, activeNavHandler }) => { |
| 4 | |
| 5 | return ( |
| 6 | <div className="bs-tab-list"> |
| 7 | {navs.map((item, i) => ( |
| 8 | <div key={i} className={`bs-tab ${current === i ? "bs-active-tab" : " "}`} onClick={() => activeNavHandler(i)}>{item.title}</div> |
| 9 | ))} |
| 10 | </div> |
| 11 | ) |
| 12 | } |
| 13 | |
| 14 | export default Navs |
| 15 | |
| 16 | |
| 17 | const navs = [ |
| 18 | |
| 19 | // { |
| 20 | // title: "Blocks", |
| 21 | // }, |
| 22 | { |
| 23 | title: "Starter Templates" |
| 24 | }, |
| 25 | { |
| 26 | title: "Explore More", |
| 27 | }, |
| 28 | // { |
| 29 | // title: "Settings", |
| 30 | // }, |
| 31 | // { |
| 32 | // title: "Colors" |
| 33 | // }, |
| 34 | // { |
| 35 | // title: "Typography" |
| 36 | // } |
| 37 | ] |