packages/ringcentral-widgets/components/RecentActivityPanel/index.js
function RecentActivityPanel(props) {
  const { title, expanded, onPanelToggle } = props;
  const toggleButton = {
    label: <ToggleIcon expanded={expanded} />,
    onClick: onPanelToggle,
    placement: 'right'
  };
  if (!props.currentContact) {
    return null;
  }
  const containerClass = classnames(styles.container, props.className);
  return (
    <div className={containerClass}>
      <div className={styles.header} onClick={onPanelToggle}>
        <Header buttons={[toggleButton]} className={styles.header}>{title}</Header>
      </div>
      <RecentActivityView {...props} />
    </div>
  );
}
function RecentActivityPanel(props) {
  const { title, expanded, onPanelToggle } = props;
  const toggleButton = {
    label: <ToggleIcon expanded={expanded} />,
    onClick: onPanelToggle,
    placement: 'right'
  };
  if (!props.currentContact) {
    return null;
  }
  const containerClass = classnames(styles.container, props.className);
  return (
    <div className={containerClass}>
      <div className={styles.header} onClick={onPanelToggle}>
        <Header buttons={[toggleButton]} className={styles.header}>{title}</Header>
      </div>
      <RecentActivityView {...props} />
    </div>
  );
}
function RecentActivityPanel ( props ) { const { title , expanded , onPanelToggle } = props ; const toggleButton = { label : < ToggleIcon expanded = { expanded } / > , onClick : onPanelToggle , placement : 'right' } ; if ( ! props . currentContact ) { return null ; } const containerClass = classnames ( styles . container , props . className ) ; return ( < div className = { containerClass } > < div className = { styles . header } onClick = { onPanelToggle } > < Header buttons = { [ toggleButton ] } className = { styles . header } > { title } < / Header > < / div > < RecentActivityView { ... props } / > < / div > ) ; }
RecentActivityPanel component provides a animated slide-out panel.
RecentActivityPanel component provides a animated slide - out panel .