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; align-items: center;
} }
.buttonWrap {
display: flex;
align-items: center;
height: 100%;
button {
color: currentColor;
}
}
.icon { .icon {
height: 15px; height: 15px;
margin-right: 5px; margin-right: 5px;
} }
.menu { .menu {
border: none; color: currentColor;
background-color: transparent; // border: none;
margin: 8px; // background-color: transparent;
// margin: 8px;
} }

View File

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