UNPKG

wix-style-react

Version:
46 lines (40 loc) 1.04 kB
import React from 'react'; import PropTypes from 'prop-types'; import { ItemGroup, Item, Label, SelectedCount, Title, Divider, } from './Compounds'; import { WixStyleReactContext } from '../WixStyleReactProvider/context'; import { st, classes } from './TableToolbar.st.css'; const TableToolbar = ({ dataHook, className, children }) => ( <WixStyleReactContext.Consumer> {({ reducedSpacingAndImprovedLayout }) => ( <div data-hook={dataHook} className={st( classes.root, { reducedSpacingAndImprovedLayout }, className, )} > {children} </div> )} </WixStyleReactContext.Consumer> ); TableToolbar.propTypes = { className: PropTypes.string, dataHook: PropTypes.string, }; TableToolbar.ItemGroup = ItemGroup; TableToolbar.Item = Item; TableToolbar.Label = Label; TableToolbar.SelectedCount = SelectedCount; TableToolbar.Title = Title; TableToolbar.Divider = Divider; TableToolbar.displayName = 'TableToolbar'; export default TableToolbar;