UNPKG

wix-style-react

Version:
20 lines 964 B
import React from 'react'; import PropTypes from 'prop-types'; import Text from '../Text'; import { st, classes } from './SidebarTitleItemNext.st.css'; import { skins } from './constants'; import { SidebarNextContext } from '../SidebarNext/SidebarNextContext'; /** Sidebar title item */ const SidebarTitleItemNext = ({ dataHook, children } = {}) => { return (React.createElement(SidebarNextContext.Consumer, null, context => { const skin = (context && context.skin) || skins.dark; return (React.createElement(Text, { dataHook: dataHook, "data-title-skin": skin, className: st(classes.root, { skin }), size: "tiny", weight: "bold" }, children)); })); }; SidebarTitleItemNext.displayName = 'SidebarTitleItemNext'; SidebarTitleItemNext.propTypes = { /** Applies a data-hook HTML attribute that can be used in tests. */ dataHook: PropTypes.string, }; export default SidebarTitleItemNext; //# sourceMappingURL=SidebarTitleItemNext.js.map