📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
Added dark mode support; added warning type
Blue Mouse8b7b787ca23e
diff --git a/src/ui/Modal.jsx b/src/ui/Modal.jsxindex af7bf2a91..e6df5df5a 100644--- a/src/ui/Modal.jsx+++ b/src/ui/Modal.jsx@@ -22,7 +22,7 @@ const Modal = ({leaveFrom='opacity-100'leaveTo='opacity-0'>- <Dialog.Overlay className='fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity' />+ <Dialog.Overlay className='fixed inset-0 bg-gray-500 bg-opacity-75 dark:bg-opacity-55 transition-opacity' /></Transition.Child>{/* This element is to trick the browser into centering the modal contents. */}@@ -38,7 +38,7 @@ const Modal = ({leaveFrom='opacity-100 translate-y-0 sm:scale-100'leaveTo='opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95'>- <div className='inline-block align-bottom bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:px-5 sm:py-4'>+ <div className='inline-block align-bottom bg-white dark:bg-gray-700 rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:px-5 sm:py-4'><div className='sm:flex sm:items-start'>{type === 'success' && (<div className='mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-green-100 sm:mx-0 sm:h-10 sm:w-10'>@@ -55,12 +55,17 @@ const Modal = ({<InformationCircleIcon className='h-6 w-6 text-blue-600' aria-hidden='true' /></div>)}+ {type === 'warning' && (+ <div className='mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-orange-100 sm:mx-0 sm:h-10 sm:w-10'>+ <ExclamationIcon className='h-6 w-6 text-amber-600' aria-hidden='true' />+ </div>+ )}<div className='mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left'>- <Dialog.Title as='h3' className='text-lg leading-6 font-medium text-gray-900'>+ <Dialog.Title as='h3' className='text-lg leading-6 font-medium text-gray-900 dark:text-gray-50'>{title}</Dialog.Title><div className='mt-2'>- <p className='text-sm text-gray-500 whitespace-pre-line'>+ <p className='text-sm text-gray-500 whitespace-pre-line dark:text-gray-200'>{message}</p></div>@@ -98,7 +103,7 @@ const Modal = ({}Modal.propTypes = {- type: PropTypes.oneOf(['error', 'success', 'info']),+ type: PropTypes.oneOf(['error', 'success', 'info', 'warning']),title: PropTypes.string.isRequired,onClose: PropTypes.func.isRequired,message: PropTypes.string,