import * as React from 'react';
import Select from '@material-ui/core/Select';
import MenuItem from '@material-ui/core/MenuItem';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
const styles = theme => ({
text: {
fontSize: 14,
color: '#373c45'
},
li: {
height: "20px",
color: "#888888",
fontFamily: "Lato-Regular",
fontSize: "14px"
},
selected: {
backgroundColor: "#e9f6ff !important",
color: "#0290ff"
},
})
class FontSizeInput extends React.Component {
anchorEl: HTMLElement;
constructor(props) {
super(props);
this.state = {
showColorPicker: false
}
this.fontSizeFlag = true;
this.fontFamilyFlag = true;
}
onFontfamilyChange = (e) => {
this.fontFamilyFlag = false;
e.preventDefault();
this.setState({
fontfamilySelected: e.target.value
})
if (this.props.onFontfamilyChange)
this.props.onFontfamilyChange(e);
}
onFontSizeChanged = (e) => {
this.fontSizeFlag = false;
e.preventDefault();
this.setState({
selectedFontSize: e.target.value
})
if (this.props.onFontSizeChanged)
this.props.onFontSizeChanged(e)
}
render() {
const { classes, fontData } = this.props;
let sizeVal = this.state.selectedFontSize,
fontFamilyVal = this.state.fontfamilySelected;
if (this.fontSizeFlag) {
sizeVal = fontData.fontSizeValue;
}
if (this.fontFamilyFlag) {
fontFamilyVal = fontData.fontFamilyValue
}
return (
<>
>
)
}
}
FontSizeInput.propTypes = {
classes: PropTypes.object.isRequired,
};
export default withStyles(styles)(FontSizeInput)