UNPKG

@talend/react-components

Version:
34 lines 1.06 kB
import { Children } from 'react'; import PropTypes from 'prop-types'; import { Navbar } from '@talend/react-bootstrap'; import cssModule from './ListToolbar.module.scss'; import { getTheme } from '../../../theme'; import { jsx as _jsx } from "react/jsx-runtime"; const theme = getTheme(cssModule); const Right = ({ children }) => /*#__PURE__*/_jsx("ul", { className: theme('tc-list-toolbar-right'), children: Children.map(children, childElement => childElement && /*#__PURE__*/_jsx("li", { className: theme('tc-list-toolbar-separated'), children: childElement })) }); Right.propTypes = { children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]) }; function ListToolbar(props) { return /*#__PURE__*/_jsx(Navbar, { componentClass: "div", className: theme('tc-list-toolbar'), role: "toolbar", fluid: true, children: props.children }); } ListToolbar.propTypes = { children: PropTypes.node }; ListToolbar.Right = Right; export default ListToolbar; //# sourceMappingURL=ListToolbar.component.js.map