@ant-design/icons#ColumnHeightOutlined JavaScript Examples

The following examples show how to use @ant-design/icons#ColumnHeightOutlined. 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: tableSize.js    From ant-simple-pro with MIT License 6 votes vote down vote up
TableSize = memo(function TableSize({ tableSize, className }) {
  const handleClick = (e) => tableSize(e.key);

  const menu = (
    <Menu onClick={handleClick} selectable defaultSelectedKeys={['middle']}>
      <Menu.Item key='middle'>默认</Menu.Item>
      <Menu.Item key='large'>松散</Menu.Item>
      <Menu.Item key='small'>紧凑</Menu.Item>
    </Menu>
  );

  return (
    <>
      <Tooltip title='密度' placement="left">
        <Dropdown overlay={menu} placement="bottomCenter">
          <ColumnHeightOutlined className={className} />
        </Dropdown>
      </Tooltip>
    </>
  )
})
Example #2
Source File: DensityIcon.js    From the-eye-knows-the-garbage with MIT License 6 votes vote down vote up
DensityIcon = function DensityIcon(_, ref) {
  var counter = Container.useContainer();
  var intl = useIntl();
  return React.createElement(_Dropdown, {
    overlay: React.createElement(_Menu, {
      selectedKeys: [counter.tableSize],
      onClick: function onClick(_ref) {
        var key = _ref.key;

        if (counter.setTableSize) {
          counter.setTableSize(key);
        }
      },
      style: {
        width: 80
      }
    }, React.createElement(_Menu.Item, {
      key: "large"
    }, intl.getMessage('tableToolBar.densityLarger', '默认')), React.createElement(_Menu.Item, {
      key: "middle"
    }, intl.getMessage('tableToolBar.densityMiddle', '中等')), React.createElement(_Menu.Item, {
      key: "small"
    }, intl.getMessage('tableToolBar.densitySmall', '紧凑'))),
    trigger: ['click']
  }, React.createElement(_Tooltip, {
    ref: ref,
    title: intl.getMessage('tableToolBar.density', '表格密度')
  }, React.createElement(ColumnHeightOutlined, null)));
}