@ant-design/icons#VerticalAlignMiddleOutlined JavaScript Examples

The following examples show how to use @ant-design/icons#VerticalAlignMiddleOutlined. 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: index.js    From the-eye-knows-the-garbage with MIT License 5 votes vote down vote up
CheckboxListItem = function CheckboxListItem(_ref2) {
  var columnKey = _ref2.columnKey,
      className = _ref2.className,
      columnsMap = _ref2.columnsMap,
      title = _ref2.title,
      setColumnsMap = _ref2.setColumnsMap,
      fixed = _ref2.fixed;
  var intl = useIntl();
  var config = columnsMap[columnKey || 'null'] || {
    show: true
  };
  return React.createElement("span", {
    className: "".concat(className, "-list-item"),
    key: columnKey
  }, React.createElement(_Checkbox, {
    onChange: function onChange(e) {
      if (columnKey) {
        var tempConfig = columnsMap[columnKey || ''] || {};

        var newSetting = _objectSpread({}, tempConfig);

        if (e.target.checked) {
          delete newSetting.show;
        } else {
          newSetting.show = false;
        }

        var columnKeyMap = _objectSpread(_objectSpread({}, columnsMap), {}, _defineProperty({}, columnKey, newSetting));

        setColumnsMap(columnKeyMap);
      }
    },
    checked: config.show !== false
  }, title), React.createElement("span", {
    className: "".concat(className, "-list-item-option")
  }, React.createElement(ToolTipIcon, {
    columnKey: columnKey,
    fixed: "left",
    title: intl.getMessage('tableToolBar.leftPin', '固定到左边'),
    show: fixed !== 'left'
  }, React.createElement(PushpinOutlined, {
    style: {
      transform: 'rotate(-90deg)'
    }
  })), React.createElement(ToolTipIcon, {
    columnKey: columnKey,
    fixed: undefined,
    title: intl.getMessage('tableToolBar.noPin', '取消固定'),
    show: !!fixed
  }, React.createElement(VerticalAlignMiddleOutlined, null)), React.createElement(ToolTipIcon, {
    columnKey: columnKey,
    fixed: "right",
    title: intl.getMessage('tableToolBar.rightPin', '固定到右边'),
    show: fixed !== 'right'
  }, React.createElement(PushpinOutlined, null))));
}