Download wp-calypso/client/reader/list-manage/item-remove-dialog.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 928 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/reader/list-manage/item-remove-dialog.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/reader/list-manage/item-remove-dialog.jsx
-
curl -L -o item-remove-dialog.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/reader/list-manage/item-remove-dialog.jsx
928 Bytes
| import { Dialog, Gridicon } from '@automattic/components'; | |
| import { useTranslate } from 'i18n-calypso'; | |
| export default function ItemRemoveDialog( props ) { | |
| const { title, visibility, onClose, type } = props; | |
| const translate = useTranslate(); | |
| return ( | |
| <Dialog | |
| isVisible={ visibility } | |
| buttons={ [ | |
| { action: 'cancel', label: translate( 'Cancel' ) }, | |
| { action: 'delete', label: translate( 'Remove' ), isPrimary: true }, | |
| ] } | |
| onClose={ ( action ) => { | |
| onClose( action === 'delete' ); | |
| } } | |
| > | |
| <h1>{ translate( 'Are you sure you want to remove this item?' ) }</h1> | |
| { title && ( | |
| <p className="list-manage__dialog-item-title"> | |
| <Gridicon | |
| className="list-manage__dialog-item-title-icon" | |
| icon={ type === 'tag' ? 'tag' : 'globe' } | |
| size="16" | |
| /> | |
| <strong>{ title }</strong> | |
| </p> | |
| ) } | |
| <p>{ translate( 'This action cannot be undone.' ) }</p> | |
| </Dialog> | |
| ); | |
| } | |