|
1 | 1 | import { Box, IconButton, Menu, MenuItem } from '@mui/material';
|
2 | 2 | import React, { useState } from 'react';
|
3 | 3 | import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from 'react-share';
|
| 4 | +import { Typography } from '../../base'; |
4 | 5 | import { ChainIcon, FacebookIcon, LinkedinIcon, ShareIcon, TwitterIcon } from '../../icons';
|
5 | 6 | import { useTheme } from '../../theme';
|
6 | 7 | import { Pattern } from '../CustomCatalog/CustomCard';
|
7 | 8 | import { CustomTooltip } from '../CustomTooltip';
|
8 | 9 | import { ErrorBoundary } from '../ErrorBoundary';
|
9 |
| -import { ActionButton, CopyShareIconWrapper, VisibilityChip } from './style'; |
| 10 | +import { |
| 11 | + CopyShareIconWrapper, |
| 12 | + ShareButton, |
| 13 | + ShareButtonGroup, |
| 14 | + ShareSideButton, |
| 15 | + VisibilityChip |
| 16 | +} from './style'; |
10 | 17 |
|
11 | 18 | interface SocialSharePopperProps {
|
12 | 19 | details: Pattern;
|
@@ -55,12 +62,22 @@ const SocialSharePopper: React.FC<SocialSharePopperProps> = ({
|
55 | 62 | </VisibilityChip>
|
56 | 63 |
|
57 | 64 | {showShareAction ? (
|
58 |
| - <CustomTooltip title="Share" placement="top" arrow> |
59 |
| - <ActionButton sx={{ borderRadius: '0.2rem', padding: '0.4rem' }} onClick={handleShare}> |
60 |
| - <ChainIcon height={'24'} width={'24'} fill={theme.palette.icon.inverse} /> |
61 |
| - Share |
62 |
| - </ActionButton> |
63 |
| - </CustomTooltip> |
| 65 | + <ShareButtonGroup variant="contained"> |
| 66 | + <CustomTooltip title="Change access and visibility"> |
| 67 | + <ShareButton variant="contained" onClick={handleShare}> |
| 68 | + <Typography>Share</Typography> |
| 69 | + </ShareButton> |
| 70 | + </CustomTooltip> |
| 71 | + <CustomTooltip title="Copy link to design"> |
| 72 | + <ShareSideButton |
| 73 | + variant="contained" |
| 74 | + size="small" |
| 75 | + onClick={() => handleCopyUrl(cleanedType, details?.name, details?.id)} |
| 76 | + > |
| 77 | + <ChainIcon height={'24'} width={'24'} fill={theme.palette.icon.inverse} /> |
| 78 | + </ShareSideButton> |
| 79 | + </CustomTooltip> |
| 80 | + </ShareButtonGroup> |
64 | 81 | ) : (
|
65 | 82 | <>
|
66 | 83 | {details?.visibility !== 'private' && (
|
|
0 commit comments