I'm using Typography from antd. I found there is a property called type including 'secondary', 'success', 'warning' etc.. But, I would like to use additional custom property called 'heading' too.
import React from 'react';
import PropTypes from 'prop-types';
import Component from './component';
export default function Title(props) {
return <Component {...props} />;
}
Title.propTypes = {
code: PropTypes.bool,
copyable: PropTypes.bool,
delete: PropTypes.bool,
disabled: PropTypes.bool,
editable: PropTypes.bool,
ellipsis: PropTypes.bool,
level: PropTypes.oneOf([1, 2, 3, 4, 5]),
mark: PropTypes.bool,
onClick: PropTypes.func,
italic: PropTypes.bool,
type: PropTypes.oneOf(['secondary', 'success', 'warning', 'danger']),
underline: PropTypes.bool,
heading: PropTypes.oneOf([ <<<<----------
'Main-heading',
'Sub-heading',
'Accent-heading',
'Subscript-heading',
]),
};
When I select the one of heading types, the result looks like this.
<h1 class="ant-typography" heading="Main-heading">Typography</h1>
In this case, how can I change style of the 'heading' element? It is not recognized as class.