UNPKG

@e-group/material-module

Version:
34 lines (33 loc) 1.33 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import React, { forwardRef } from 'react'; import clsx from 'clsx'; import { makeStyles } from '@material-ui/core'; import Typography from '@material-ui/core/Typography'; import QuestionOptionDecorated from '../QuestionOptionDecorated'; const useStyles = makeStyles(() => ({ root: { display: 'flex', alignItems: 'center' } })); const QuestionOption = /*#__PURE__*/forwardRef((props, ref) => { const className = props.className, _props$type = props.type, type = _props$type === void 0 ? 'radio' : _props$type, index = props.index, MuiTypographyProps = props.MuiTypographyProps, children = props.children, other = _objectWithoutProperties(props, ["className", "type", "index", "MuiTypographyProps", "children"]); const classes = useStyles(); return /*#__PURE__*/React.createElement("div", _extends({ className: clsx(className, classes.root), ref: ref }, other), /*#__PURE__*/React.createElement(QuestionOptionDecorated, { type: type, index: index }), /*#__PURE__*/React.createElement(Typography, _extends({ variant: "body1" }, MuiTypographyProps), children)); }); export default QuestionOption;