Skip to content

Commit d7819fb

Browse files
committed
fix(mui): pass all props to plain-text
1 parent e6a3ab1 commit d7819fb

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/mui-component-mapper/src/files/plain-text.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import React from 'react';
22
import { Typography } from '@material-ui/core';
33
import PropTypes from 'prop-types';
44

5-
const PlainText = ({ label, name }) =>
5+
const PlainText = ({ label, name, ...props }) =>
66
label.split('\n').map((paragraph, index) => (
7-
<Typography key={`${index}-${name}`} gutterBottom variant="body1">
7+
<Typography key={`${index}-${name}`} {...props}>
88
{paragraph}
99
</Typography>
1010
));
@@ -14,4 +14,9 @@ PlainText.propTypes = {
1414
name: PropTypes.string.isRequired
1515
};
1616

17+
PlainText.defaultProps = {
18+
variant: 'body1',
19+
gutterBottom: true
20+
};
21+
1722
export default PlainText;

0 commit comments

Comments
 (0)