import React, { memo } from 'react' import { Menu, MenuItem, TextField, Typography } from '@mui/material' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import { ChartParameters } from '../../../reducers/Charts' import { chartActions } from '../../../actions' function Size(props: { actions: { chart: typeof chartActions } chart: ChartParameters anchorEl?: Element open: boolean close: () => void }) { const setChartWidth = (width?: 'big' | 'medium' | 'small') => () => { props.actions.chart.updateChart({ width, topic: props.chart.topic, dotPath: props.chart.dotPath, }) props.close() } return ( auto 100% width 50% width 33% width ) } const mapDispatchToProps = (dispatch: any) => ({ actions: { chart: bindActionCreators(chartActions, dispatch), }, }) export default connect(undefined, mapDispatchToProps)(memo(Size))