import { MdxCodeHighlight } from '../MdxPre/MdxPre';
import { MdxTitle } from '../MdxTitle/MdxTitle';
import { MdxCode, MdxLi, MdxParagraph, MdxUl } from '../MdxTypography/MdxTypography';
const getCode = (component: string) => `
import { ${component} } from '@mantine/core';
function Demo() {
return <${component} wrapperProps={{ 'data-testid': 'wrapper' }} data-testid="input" />;
}
`;
interface MdxWrapperPropsProps {
component: string;
}
export function MdxWrapperProps({ component }: MdxWrapperPropsProps) {
return (
<>
Add props to the root element
All props passed to the component are forwarded to the input element. If you need to add
props to the root element, use wrapperProps. In the following example:
data-testid="wrapper" is added to the root element
data-testid="input" is added to the input element
>
);
}