import React from 'react'; import { Dialog, Grid, Typography, TextField, Button } from '@material-ui/core'; var cloneDeep = require('lodash/cloneDeep'); export interface ArtistProperties { name: String, } export interface IProps { dialogOpen: boolean, onClose?: () => void, onChangeArtistProperties?: (props: ArtistProperties) => void, artistProperties: ArtistProperties, onSubmit?: () => void, } export default function EditArtistDialog(props: IProps) { const onNameChange = (name: String) => { if (props.onChangeArtistProperties) { const p = cloneDeep(props.artistProperties); p.name = name; props.onChangeArtistProperties(p); } }; return Artist Details onNameChange(i.target.value)} fullWidth /> }