← All changes
|
backend/views/components/Main/components/PopUp.jsx
+17
-16
1.4.6
→
1.4.21
View file →
| @@ -1,7 +1,8 @@ | ||
| 1 | 1 | import { Dialog } from '@headlessui/react'; |
| 2 | 2 | import { XMarkIcon } from '@heroicons/react/24/solid'; |
| 3 | 3 | import { __ } from '@wordpress/i18n'; |
| 4 | + | |
| 4 | 5 | const Popup = ({ |
| 5 | 6 | title = 'Products Added', |
| 6 | 7 | data = [], |
| 7 | 8 | open = false, |
| @@ -12,54 +13,54 @@ | ||
| 12 | 13 | return ( |
| 13 | 14 | <Dialog |
| 14 | 15 | open={open} |
| 15 | 16 | onClose={onClose} |
| 16 | - className="disco-relative disco-z-50" | |
| 17 | + className="disco:relative disco:z-50" | |
| 17 | 18 | > |
| 18 | 19 | <div |
| 19 | - className="disco-fixed disco-inset-0 disco-bg-black/50" | |
| 20 | + className="disco:fixed disco:inset-0 disco:bg-black/50" | |
| 20 | 21 | aria-hidden="true" |
| 21 | 22 | /> |
| 22 | - <div className="disco-fixed disco-inset-0 disco-flex disco-items-center disco-justify-center disco-p-2"> | |
| 23 | - <Dialog.Panel className="disco-bg-white disco-rounded-xl disco-shadow-2xl disco-min-w-xs disco-p-4 disco-max-h-[60vh] disco-flex disco-flex-col"> | |
| 24 | - <Dialog.Title className="disco-text-lg disco-font-semibold disco-mb-4 disco-flex disco-justify-between disco-items-center"> | |
| 25 | - <div className="disco-flex disco-items-center disco-gap-2"> | |
| 23 | + <div className="disco:fixed disco:inset-0 disco:flex disco:items-center disco:justify-center disco:p-2"> | |
| 24 | + <Dialog.Panel className="disco:bg-white disco:rounded-xl disco:shadow-2xl disco:min-w-xs disco:p-4 disco:max-h-[60vh] disco:flex disco:flex-col"> | |
| 25 | + <Dialog.Title className="disco:text-lg disco:font-semibold disco:mb-4 disco:flex disco:justify-between disco:items-center"> | |
| 26 | + <div className="disco:flex disco:items-center disco:gap-2"> | |
| 26 | 27 | {title} |
| 27 | - <span className="disco-text-lg disco-font-medium disco-text-gray-600"> | |
| 28 | + <span className="disco:text-lg disco:font-medium disco:text-gray-600"> | |
| 28 | 29 | ({totalCount}) |
| 29 | 30 | </span> |
| 30 | 31 | </div> |
| 31 | 32 | <button |
| 32 | 33 | onClick={onClose} |
| 33 | - className="disco-text-gray-500 hover:disco-text-black disco-text-xl disco-font-light" | |
| 34 | + className="disco:text-gray-500 disco:hover:text-black disco:text-xl disco:font-light" | |
| 34 | 35 | > |
| 35 | - <XMarkIcon className="disco-size-5 disco-text-red-700" /> | |
| 36 | + <XMarkIcon className="disco:size-5 disco:text-red-700" /> | |
| 36 | 37 | </button> |
| 37 | 38 | </Dialog.Title> |
| 38 | 39 | |
| 39 | 40 | {/* 2. Content: Product List */} |
| 40 | 41 | {data.length > 0 ? ( |
| 41 | - <div className="disco-space-y-1 disco-flex-grow disco-overflow-y-auto disco-p-2 disco-rounded-md disco-shadow"> | |
| 42 | + <div className="disco:space-y-1 disco:grow disco:overflow-y-auto disco:p-2 disco:rounded-md disco:shadow"> | |
| 42 | 43 | {data.map((item) => ( |
| 43 | 44 | <div |
| 44 | 45 | key={item.id} |
| 45 | - className="disco-p-1 disco-flex disco-items-center disco-gap-3" | |
| 46 | + className="disco:p-1 disco:flex disco:items-center disco:gap-3" | |
| 46 | 47 | > |
| 47 | - <div className="disco-w-6 disco-h-6 disco-flex disco-items-center disco-justify-center disco-text-xl"> | |
| 48 | + <div className="disco:w-6 disco:h-6 disco:flex disco:items-center disco:justify-center disco:text-xl"> | |
| 48 | 49 | {item.image ? ( |
| 49 | 50 | <img |
| 50 | 51 | src={item.image} |
| 51 | 52 | alt={item.name} |
| 52 | - className="disco-w-6 disco-h-6 disco-rounded" | |
| 53 | + className="disco:w-6 disco:h-6 disco:rounded" | |
| 53 | 54 | /> |
| 54 | 55 | ) : ( |
| 55 | - <span className="disco-text-base"> | |
| 56 | + <span className="disco:text-base"> | |
| 56 | 57 | {item.emoji || '📦'} |
| 57 | 58 | </span> |
| 58 | 59 | )} |
| 59 | 60 | </div> |
| 60 | 61 | |
| 61 | - <p className="disco-text-gray-700 disco-font-light"> | |
| 62 | + <p className="disco:text-gray-700 disco:font-light"> | |
| 62 | 63 | {item.id} - {item.name} |
| 63 | 64 | </p> |
| 64 | 65 | </div> |
| 65 | 66 | ))} |
| @@ -64,9 +65,9 @@ | ||
| 64 | 65 | </div> |
| 65 | 66 | ))} |
| 66 | 67 | </div> |
| 67 | 68 | ) : ( |
| 68 | - <div className="disco-text-center disco-text-gray-500 disco-py-8"> | |
| 69 | + <div className="disco:text-center disco:text-gray-500 disco:py-8"> | |
| 69 | 70 | {__('No items available.', 'disco')} |
| 70 | 71 | </div> |
| 71 | 72 | )} |
| 72 | 73 | </Dialog.Panel> |