message: fix(origin-ui): fix actions panel showing after closing modal
diff: @@ -2,11 +2,22 @@ import SpeedDial from '@material-ui/lab/SpeedDial';
  import SpeedDialIcon from '@material-ui/lab/SpeedDialIcon';
  import SpeedDialAction from '@material-ui/lab/SpeedDialAction';
  import { MoreHoriz } from '@material-ui/icons';
  -import React from 'react';
  -import { withStyles, createStyles, WithStyles } from '@material-ui/core';
  +import React, { useState } from 'react';
  +import { useTheme, createStyles, makeStyles } from '@material-ui/core';
  import { STYLE_CONFIG } from '../../styles/styleConfig';
  -const styles = () =>
  +export interface ITableAction {
  + name: string;
  + icon: React.ReactNode;
  + onClick: (rowIndex: number) => void;
  +}
  +
  +interface IProps {
  + actions: ITableAction[];
  + id: number;
  +}
  +
  +const useStyles = makeStyles(() =>
  createStyles({
  speedDial: {
  position: 'absolute',
  @@ -34,47 +45,14 @@ const styles = () =>
  backgroundColor: STYLE_CONFIG.PRIMARY_COLOR,
  whiteSpace: 'nowrap'
  }
  - });
  -
  -export interface ITableAction {
  - name: string;
  - icon: React.ReactNode;
  - onClick: (rowIndex: number) => void;
  -}
  -
  -interface IProps extends WithStyles<typeof styles> {
  - actions: ITableAction[];
  - id: number;
  -}
  -
  -interface IState {
  - open: boolean;
  -}
  -
  -class ActionsClass extends React.Component<IProps, IState> {
  - constructor(props: IProps) {
  - super(props);
  -
  - this.state = {
  - open: false
  - };
  - }
  -
  - render() {
  - const { actions, id, classes } = this.props;
  - const { open } = this.state;
  + })
  +);
  - const openMenu = () => {
  - this.setState({
  - open: true
  - });
  - };
  +export function Actions(props: IProps) {
  + const { actions, id } = props;
  + const [open, setOpen] = useState(false);
  - const closeMenu = () => {
  - this.setState({
  - open: false
  - });
  - };
  + const classes = useStyles(useTheme());
  return (
  <SpeedDial
  @@ -90,11 +68,14 @@ class ActionsClass extends React.Component<IProps, IState> {
  }}
  />
  }
  - onBlur={closeMenu}
  - onClose={closeMenu}
  - onFocus={openMenu}
  - onMouseEnter={openMenu}
  - onMouseLeave={closeMenu}
  + onClose={() => setOpen(false)}
  + onOpen={(event, reason) => {
  + if (reason === 'focus') {
  + return;
  + }
  +
  + setOpen(true);
  + }}
  open={open}
  className={classes.speedDial}
  >
  @@ -114,6 +95,3 @@ class ActionsClass extends React.Component<IProps, IState> {
  </SpeedDial>
  );
  }
  -}
  -
  -export const Actions = withStyles(styles)(ActionsClass);
  