message: [ModalCard] To function component
diff: -import React, { Component, HTMLAttributes, MouseEventHandler, ReactNode, MouseEvent } from 'react';
  +import React, { HTMLAttributes, MouseEventHandler, ReactNode, MouseEvent, FC } from 'react';
  import Button from '../Button/Button';
  import PanelHeaderButton from '../PanelHeaderButton/PanelHeaderButton';
  import getClassName from '../../helpers/getClassName';
  @@ -52,17 +52,13 @@ export interface ModalCardProps extends HTMLAttributes<HTMLElement>, HasPlatform
  onClose?(): void;
  }
  -class ModalCard extends Component<ModalCardProps> {
  - static defaultProps: ModalCardProps = {
  - actions: [],
  - actionsLayout: 'horizontal',
  - insets: {},
  - };
  +const ModalCard: FC<ModalCardProps> = (props) => {
  + const { insets, icon, header, caption, children, actions, actionsLayout, onClose, platform, className } = props;
  - onButtonClick: MouseEventHandler = (event: MouseEvent) => {
  + const onButtonClick: MouseEventHandler = (event: MouseEvent) => {
  const target = event.currentTarget as HTMLButtonElement;
  // eslint-disable-next-line @typescript-eslint/unbound-method
  - const action = this.props.actions[Number(target.dataset.index)].action;
  + const action = actions[Number(target.dataset.index)].action;
  event.persist();
  if (typeof action === 'function') {
  @@ -70,8 +66,7 @@ class ModalCard extends Component<ModalCardProps> {
  }
  };
  - render() {
  - const { insets, icon, header, caption, children, actions, actionsLayout, onClose, platform, className } = this.props;
  + const canShowCloseBtn = platform === IOS;
  return (
  <div className={classNames(getClassName('ModalCard', platform), className)}>
  @@ -94,7 +89,7 @@ class ModalCard extends Component<ModalCardProps> {
  data-index={i}
  size="xl"
  mode={mode}
  - onClick={this.onButtonClick}
  + onClick={onButtonClick}
  >
  {title}
  </Button>
  @@ -103,15 +98,21 @@ class ModalCard extends Component<ModalCardProps> {
  </div>
  }
  - {platform === IOS &&
  + {canShowCloseBtn &&
  <PanelHeaderButton className="ModalCard__dismiss" onClick={onClose}>
  <Icon24Dismiss />
  - </PanelHeaderButton>}
  + </PanelHeaderButton>
  + }
  </div>
  </div>
  </div>
  );
  - }
  -}
  +};
  +
  +ModalCard.defaultProps = {
  + actions: [],
  + actionsLayout: 'horizontal',
  + insets: {},
  +};
  export default withPlatform(withInsets(ModalCard));
  