Estoy usando tipografía de antd. Descubrí que hay una propiedad llamada tipo que incluye 'secundario', 'éxito', 'advertencia', etc. Pero también me gustaría usar una propiedad personalizada adicional llamada 'título'.
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', ]), }; Cuando selecciono uno de los tipos de encabezado, el resultado se ve así. <h1 class="ant-typography" heading="Main-heading">Typography</h1> En este caso, ¿cómo puedo cambiar el estilo del elemento 'título'? No se reconoce como clase.