mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Minor modal refinements in AdminX
refs. https://github.com/TryGhost/Team/issues/3151
This commit is contained in:
parent
8678bbc591
commit
e6a28146e4
4 changed files with 18 additions and 19 deletions
|
@ -48,36 +48,34 @@ const Modal: React.FC<ModalProps> = ({size = 'md', title, okLabel, cancelLabel,
|
|||
switch (size) {
|
||||
case 'sm':
|
||||
modalStyles += ' max-w-[480px] p-8';
|
||||
backdropStyles += ' p-[8vmin]';
|
||||
break;
|
||||
|
||||
case 'md':
|
||||
modalStyles += ' max-w-[720px] p-8';
|
||||
backdropStyles += ' p-[8vmin]';
|
||||
break;
|
||||
|
||||
case 'lg':
|
||||
modalStyles += ' max-w-[940px] p-10';
|
||||
backdropStyles += ' p-[5vmin]';
|
||||
break;
|
||||
|
||||
case 'xl':
|
||||
modalStyles += ' max-w-[1180px] p-12';
|
||||
backdropStyles += ' p-[3vmin]';
|
||||
break;
|
||||
|
||||
case 'full':
|
||||
modalStyles += ' h-full p-12';
|
||||
backdropStyles += ' p-[2vmin]';
|
||||
break;
|
||||
|
||||
case 'bleed':
|
||||
modalStyles += ' h-full p-12';
|
||||
break;
|
||||
}
|
||||
|
||||
if (size !== 'bleed') {
|
||||
modalStyles += ' rounded-md overflow-hidden';
|
||||
}
|
||||
|
||||
if (size !== 'bleed' && size !== 'full') {
|
||||
backdropStyles += ' p-[8vmin]';
|
||||
} else if (size === 'full') {
|
||||
backdropStyles += ' p-[2vmin]';
|
||||
}
|
||||
|
||||
const handleBackdropClick = () => {
|
||||
modal.remove();
|
||||
};
|
||||
|
|
|
@ -26,9 +26,7 @@ const Facebook: React.FC = () => {
|
|||
};
|
||||
|
||||
const values = (
|
||||
<div>
|
||||
[TBD: facebook card preview]
|
||||
</div>
|
||||
<></>
|
||||
);
|
||||
|
||||
const inputFields = (
|
||||
|
|
|
@ -26,9 +26,7 @@ const Twitter: React.FC = () => {
|
|||
};
|
||||
|
||||
const values = (
|
||||
<div>
|
||||
[TBD: twitter card preview]
|
||||
</div>
|
||||
<></>
|
||||
);
|
||||
|
||||
const inputFields = (
|
||||
|
|
|
@ -10,12 +10,16 @@ import UserDetailModal from './modals/UserDetailModal';
|
|||
import useStaffUsers from '../../../hooks/useStaffUsers';
|
||||
|
||||
const Owner: React.FC<any> = ({user}) => {
|
||||
const showDetailModal = () => {
|
||||
NiceModal.show(UserDetailModal);
|
||||
};
|
||||
|
||||
if (!user) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<div className='flex flex-col'>
|
||||
<span>{user.name} — <strong>Owner</strong></span>
|
||||
<div className='group flex flex-col hover:cursor-pointer' onClick={showDetailModal}>
|
||||
<span>{user.name} — <strong>Owner</strong> <span className='invisible ml-2 inline-block text-sm font-bold text-green group-hover:visible'>Edit</span></span>
|
||||
<span className='text-xs text-grey-700'>{user.email}</span>
|
||||
</div>
|
||||
);
|
||||
|
@ -44,7 +48,8 @@ const UsersList: React.FC<any> = ({users}) => {
|
|||
detail={user.email}
|
||||
hideActions={true}
|
||||
id={`list-item-${user.id}`}
|
||||
title={user.name} />
|
||||
title={user.name}
|
||||
onClick={showDetailModal} />
|
||||
);
|
||||
})}
|
||||
</List>
|
||||
|
|
Loading…
Add table
Reference in a new issue