11import React , { useState } from 'react' ;
2-
3- import {
4- ChainIcon ,
5- FacebookIcon ,
6- LinkedinIcon ,
7- LockIcon ,
8- PublicIcon ,
9- ShareIcon ,
10- TwitterIcon
11- } from '../../icons' ;
2+ import { FacebookShareButton , LinkedinShareButton , TwitterShareButton } from 'react-share' ;
3+ import { Box , IconButton , Menu , MenuItem , Typography } from '../../base' ;
4+ import { ChainIcon , FacebookIcon , LinkedinIcon , ShareIcon , TwitterIcon } from '../../icons' ;
125import { useTheme } from '../../theme' ;
136import { Pattern } from '../CustomCatalog/CustomCard' ;
147import { CustomTooltip } from '../CustomTooltip' ;
158import { ErrorBoundary } from '../ErrorBoundary' ;
16-
17- import { FacebookShareButton , LinkedinShareButton , TwitterShareButton } from 'react-share' ;
18- import { Box , IconButton , Menu , MenuItem , Typography } from '../../base' ;
19- import { VisibilityChipMenu } from '../VisibilityChipMenu' ;
20- import { VIEW_VISIBILITY } from '../VisibilityChipMenu/VisibilityChipMenu' ;
219import { CopyShareIconWrapper , ShareButton , ShareButtonGroup , ShareSideButton } from './style' ;
2210
2311interface SocialSharePopperProps {
@@ -29,8 +17,6 @@ interface SocialSharePopperProps {
2917 handleCopyUrl : ( type : string , name : string , id : string ) => void ;
3018 showShareAction : boolean ;
3119 handleShare : ( ) => void ;
32- isVisibilityEnabled : boolean ;
33- handleVisibilityChange : ( visibility : VIEW_VISIBILITY ) => void ;
3420}
3521
3622const SocialSharePopper : React . FC < SocialSharePopperProps > = ( {
@@ -40,9 +26,7 @@ const SocialSharePopper: React.FC<SocialSharePopperProps> = ({
4026 title,
4127 getUrl,
4228 handleCopyUrl,
43- handleShare,
44- isVisibilityEnabled,
45- handleVisibilityChange
29+ handleShare
4630} ) => {
4731 const theme = useTheme ( ) ;
4832 const [ anchorEl , setAnchorEl ] = useState < null | HTMLElement > ( null ) ;
@@ -61,16 +45,6 @@ const SocialSharePopper: React.FC<SocialSharePopperProps> = ({
6145 return (
6246 < ErrorBoundary >
6347 < CopyShareIconWrapper style = { { marginBottom : '2rem' } } >
64- < VisibilityChipMenu
65- value = { details ?. visibility as VIEW_VISIBILITY }
66- onChange = { ( value ) => handleVisibilityChange ( value as VIEW_VISIBILITY ) }
67- enabled = { isVisibilityEnabled }
68- options = { [
69- [ VIEW_VISIBILITY . PUBLIC , PublicIcon ] ,
70- [ VIEW_VISIBILITY . PRIVATE , LockIcon ]
71- ] }
72- />
73-
7448 < ShareButtonGroup variant = "contained" >
7549 < CustomTooltip title = "Change access and visibility" >
7650 < ShareButton variant = "contained" onClick = { handleShare } >
0 commit comments