0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Modal refinements in AdminX

refs. https://github.com/TryGhost/Team/issues/3150
This commit is contained in:
Peter Zimon 2023-05-25 18:24:18 +02:00
parent 7bdb98ff9d
commit 505d61bf9f
3 changed files with 14 additions and 11 deletions

View file

@ -57,12 +57,12 @@ const Modal: React.FC<ModalProps> = ({size = 'md', title, okLabel, cancelLabel,
break; break;
case 'lg': case 'lg':
modalStyles += ' max-w-[940px] p-10'; modalStyles += ' max-w-[1020px] p-12';
backdropStyles += ' p-[5vmin]'; backdropStyles += ' p-[4vmin]';
break; break;
case 'xl': case 'xl':
modalStyles += ' max-w-[1180px] p-12'; modalStyles += ' max-w-[1240px] p-14';
backdropStyles += ' p-[3vmin]'; backdropStyles += ' p-[3vmin]';
break; break;

View file

@ -1,4 +1,3 @@
import IconLabel from '../../../admin-x-ds/global/IconLabel';
import Link from '../../../admin-x-ds/global/Link'; import Link from '../../../admin-x-ds/global/Link';
import React from 'react'; import React from 'react';
import SettingGroup from '../../../admin-x-ds/settings/SettingGroup'; import SettingGroup from '../../../admin-x-ds/settings/SettingGroup';
@ -6,6 +5,8 @@ import SettingGroupContent from '../../../admin-x-ds/settings/SettingGroupConten
import TextField from '../../../admin-x-ds/global/TextField'; import TextField from '../../../admin-x-ds/global/TextField';
import Toggle from '../../../admin-x-ds/global/Toggle'; import Toggle from '../../../admin-x-ds/global/Toggle';
import useSettingGroup from '../../../hooks/useSettingGroup'; import useSettingGroup from '../../../hooks/useSettingGroup';
import {ReactComponent as LockedIcon} from '../../../assets/icons/lock-locked.svg';
import {ReactComponent as UnLockedIcon} from '../../../assets/icons/lock-unlocked.svg';
const LockSite: React.FC = () => { const LockSite: React.FC = () => {
const { const {
@ -33,13 +34,15 @@ const LockSite: React.FC = () => {
{ {
key: 'private', key: 'private',
value: passwordEnabled ? ( value: passwordEnabled ? (
<IconLabel icon='lock-locked' iconColor='yellow'> <div className='flex items-center '>
Your site is password protected <LockedIcon className='mr-2 h-4 w-4 text-yellow' />
</IconLabel> <span>Your site is password protected</span>
</div>
) : ( ) : (
<IconLabel icon='lock-unlocked' iconColor='grey-900'> <div className='flex items-center text-grey-900 '>
Your site is password protected <UnLockedIcon className='mr-2 h-4 w-4' />
</IconLabel> <span>Your site is not password protected</span>
</div>
) )
} }
]} ]}

View file

@ -228,7 +228,7 @@ const UserDetailModal:React.FC<UserDetailModalProps> = ({user}) => {
<Modal <Modal
okColor='green' okColor='green'
okLabel='Save' okLabel='Save'
size='xl' size='lg'
onOk={() => { onOk={() => {
alert('Clicked OK'); alert('Clicked OK');
}} }}