2021-05-13 06:24:12 -04:00
|
|
|
import { TabList, Tab } from '@reach/tabs'
|
|
|
|
import PropTypes from 'prop-types'
|
|
|
|
|
2021-08-03 06:02:45 -04:00
|
|
|
export default function SymbolPaletteTabs({ categories }) {
|
2021-05-13 06:24:12 -04:00
|
|
|
return (
|
2021-05-20 05:19:36 -04:00
|
|
|
<TabList aria-label="Symbol Categories" className="symbol-palette-tab-list">
|
2021-05-13 06:24:12 -04:00
|
|
|
{categories.map(category => (
|
2021-08-03 06:02:45 -04:00
|
|
|
<Tab key={category.id} className="symbol-palette-tab">
|
2021-05-13 06:24:12 -04:00
|
|
|
{category.label}
|
|
|
|
</Tab>
|
|
|
|
))}
|
|
|
|
</TabList>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
SymbolPaletteTabs.propTypes = {
|
|
|
|
categories: PropTypes.arrayOf(
|
|
|
|
PropTypes.shape({
|
|
|
|
id: PropTypes.string.isRequired,
|
|
|
|
label: PropTypes.string.isRequired,
|
|
|
|
})
|
|
|
|
).isRequired,
|
|
|
|
}
|