2025-01-29 20:42:01 -05:00
|
|
|
import { ShareAltOutlined } from '@ant-design/icons';
|
2025-04-16 16:55:38 -07:00
|
|
|
import { Dropdown } from 'antd';
|
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import { useEntityData } from '@app/entity/shared/EntityContext';
|
|
|
|
import { ActionMenuItem } from '@app/entityV2/shared/EntityDropdown/styledComponents';
|
|
|
|
import ShareButtonMenu from '@app/shared/share/v2/ShareButtonMenu';
|
|
|
|
import { StyledMenu } from '@app/shared/share/v2/styledComponents';
|
2025-01-29 20:42:01 -05:00
|
|
|
|
|
|
|
export default function ShareMenuAction() {
|
|
|
|
const { urn, entityType, entityData } = useEntityData();
|
|
|
|
const subType = (entityData?.subTypes?.typeNames?.length && entityData?.subTypes?.typeNames?.[0]) || undefined;
|
|
|
|
const name = entityData?.name;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<ActionMenuItem key="share">
|
|
|
|
<Dropdown
|
|
|
|
trigger={['hover']}
|
|
|
|
overlay={
|
|
|
|
<StyledMenu selectable={false}>
|
2025-05-15 13:50:31 -07:00
|
|
|
<ShareButtonMenu
|
|
|
|
urn={urn}
|
|
|
|
entityType={entityType}
|
|
|
|
subType={subType}
|
|
|
|
name={name}
|
|
|
|
qualifiedName={entityData?.properties?.qualifiedName}
|
|
|
|
/>
|
2025-01-29 20:42:01 -05:00
|
|
|
</StyledMenu>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<ShareAltOutlined style={{ display: 'flex' }} />
|
|
|
|
</Dropdown>
|
|
|
|
</ActionMenuItem>
|
|
|
|
);
|
|
|
|
}
|