made trigger button antd component

This commit is contained in:
t1enne
2022-10-22 10:43:35 +02:00
parent 7d9913980e
commit 7c0474f14a
2 changed files with 22 additions and 10 deletions

View File

@ -3,13 +3,23 @@
align-items: center;
}
.buttonWrap {
display: flex;
align-items: center;
height: 100%;
button {
color: currentColor;
}
}
.icon {
height: 15px;
margin-right: 5px;
}
.menu {
border: none;
background-color: transparent;
margin: 8px;
color: currentColor;
// border: none;
// background-color: transparent;
// margin: 8px;
}

View File

@ -1,5 +1,5 @@
import { FC } from 'react';
import { Dropdown, Menu, Space } from 'antd';
import { Button, Dropdown, Menu, Space } from 'antd';
import { DownOutlined, StarOutlined } from '@ant-design/icons';
import styles from './ActionButtonMenu.module.scss';
import { ExternalAction } from '../../../interfaces/external-action';
@ -32,12 +32,14 @@ export const ActionButtonMenu: FC<ActionButtonMenuProps> = ({
return (
<Dropdown overlay={menu} trigger={['click']} className={styles.menu}>
<button type="button" onClick={e => e.preventDefault()}>
<Space>
<StarOutlined />
<DownOutlined />
</Space>
</button>
<div className={styles.buttonWrap}>
<Button type="default" onClick={e => e.preventDefault()}>
<Space>
<StarOutlined />
<DownOutlined />
</Space>
</Button>
</div>
</Dropdown>
);
};