Download wp-calypso/client/blocks/post-share/sharing-preview-modal.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 940 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/blocks/post-share/sharing-preview-modal.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/blocks/post-share/sharing-preview-modal.jsx
-
curl -L -o sharing-preview-modal.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/blocks/post-share/sharing-preview-modal.jsx
940 Bytes
| import { Dialog, Gridicon } from '@automattic/components'; | |
| import PropTypes from 'prop-types'; | |
| import SharingPreviewPane from 'calypso/blocks/sharing-preview-pane'; | |
| const SharingPreviewModal = ( props ) => { | |
| const { isVisible, onClose, ...previewProps } = props; | |
| return ( | |
| <Dialog isVisible={ isVisible } additionalClassNames="post-share__sharing-preview-modal"> | |
| <header className="post-share__sharing-preview-modal-header"> | |
| <button onClick={ onClose } className="post-share__sharing-preview-modal-close"> | |
| <Gridicon icon="cross" /> | |
| </button> | |
| </header> | |
| <SharingPreviewPane { ...previewProps } /> | |
| </Dialog> | |
| ); | |
| }; | |
| SharingPreviewModal.propTypes = { | |
| isVisible: PropTypes.bool.isRequired, | |
| onClose: PropTypes.func.isRequired, | |
| // SharingPreviewPane props | |
| siteId: PropTypes.number, | |
| postId: PropTypes.number, | |
| message: PropTypes.string, | |
| selectedService: PropTypes.string, | |
| }; | |
| export default SharingPreviewModal; | |