@zohodesk/components
Version:
Dot UI is a customizable React component library built to deliver a clean, accessible, and developer-friendly UI experience. It offers a growing set of reusable components designed to align with modern design systems and streamline application development
44 lines (42 loc) • 1.17 kB
JavaScript
import React from 'react';
import { DropDownHeading_propTypes } from "./props/propTypes";
import { DropDownHeading_defaultProps } from "./props/defaultProps";
import style from "./DropDownHeading.module.css";
export default class DropDownHeading extends React.Component {
render() {
let {
text,
title = text,
children,
customClass,
palette,
htmlId,
a11y,
dataId,
dataSelectorId
} = this.props;
let {
role,
ariaLabelledby,
ariaLabel
} = a11y;
return /*#__PURE__*/React.createElement("div", {
className: `${style[palette]} ${customClass}`,
"data-title": title,
role: role,
"aria-labelledby": ariaLabelledby,
"aria-label": ariaLabel,
id: htmlId,
"data-id": dataId,
"data-test-id": dataId,
"data-selector-id": dataSelectorId // tabindex='0'
}, text, children);
}
}
DropDownHeading.propTypes = DropDownHeading_propTypes;
DropDownHeading.defaultProps = DropDownHeading_defaultProps; // if (__DOCS__) {
// DropDownHeading.docs = {
// componentGroup: 'Form Elements',
// folderName: 'Style Guide'
// };
// }