UNPKG

react-carousel-query

Version:

A infinite carousel component made with react that handles the pagination for you.

17 lines (16 loc) 465 B
import React from 'react'; import { H3 } from '@storybook/components'; import { HeaderMdx } from './mdx'; export const Subheading = ({ children, disableAnchor }) => { if (disableAnchor || typeof children !== 'string') { return /*#__PURE__*/React.createElement(H3, null, children); } const tagID = children.toLowerCase().replace(/[^a-z0-9]/gi, '-'); return /*#__PURE__*/React.createElement(HeaderMdx, { as: "h3", id: tagID }, children); };