@ant-design/icons#EyeTwoTone TypeScript Examples

The following examples show how to use @ant-design/icons#EyeTwoTone. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GroupDetailModal.tsx    From ppeforfree with GNU General Public License v3.0 5 votes vote down vote up
DetailModal = ({
  id,
  name,
  description,
  locations,
  isPublic,
  foundedOn,
  memberCount,
  memberCountIncreaseWeekly,
  postCountIncreaseDaily,
  postCountIncreaseMonthly,
}: Props) => {
  const [modalVisible, setModalVisible] = useState<boolean>(false);

  const showModal = () => {
    setModalVisible(true);
  };

  const hideModal = () => {
    setModalVisible(false);
  };

  return (
    <>
      <div data-testid="eye-icon" className="button" onClick={showModal}>
        <EyeTwoTone />
      </div>
      <AntDModal
        title={name}
        visible={modalVisible}
        onOk={hideModal}
        onCancel={hideModal}
        footer={null}
      >
        <Row>
          <Col>
            {description && <Paragraph>{description}</Paragraph>}
            {id && (
              <Paragraph className="text-align-center">
                <SiteLink id={id} />
              </Paragraph>
            )}
            {locations && (
              <Paragraph>
                Locations:
                <ul>
                  {locations.map((location, id) => (
                    <li key={id}>{location}</li>
                  ))}
                </ul>
              </Paragraph>
            )}
          </Col>
        </Row>
        <RowValue title="Created on:" value={moment(foundedOn).format("YYYY-MM-DD")} />
        <RowValue title="Members:" value={memberCount?.toString()} />
        <RowValue
          title="New members this week:"
          value={memberCountIncreaseWeekly?.toString()}
        />
        <RowValue title="Posts today:" value={postCountIncreaseDaily?.toString()} />
        <RowValue
          title="Posts this month:"
          value={postCountIncreaseMonthly?.toString()}
        />
      </AntDModal>
    </>
  );
}