@hackplan/polaris
Version:
Shopify’s product component library
9 lines (8 loc) • 329 B
JavaScript
import React from 'react';
import styles from './Subheading.scss';
export default function Subheading({ element: Element = 'h3', children }) {
const ariaLabel = typeof children === 'string' ? children : undefined;
return (<Element aria-label={ariaLabel} className={styles.Subheading}>
{children}
</Element>);
}