2021-05-13 06:24:12 -04:00
|
|
|
import React from 'react'
|
|
|
|
import { TabList, Tab } from '@reach/tabs'
|
|
|
|
import PropTypes from 'prop-types'
|
|
|
|
|
|
|
|
export default function SymbolPaletteTabs({ categories, disabled }) {
|
|
|
|
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-05-20 05:19:36 -04:00
|
|
|
<Tab
|
|
|
|
key={category.id}
|
|
|
|
disabled={disabled}
|
|
|
|
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,
|
|
|
|
disabled: PropTypes.bool,
|
|
|
|
}
|