0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Added static user detail modal in AdminX settings

refs. https://github.com/TryGhost/Team/issues/3150
This commit is contained in:
Peter Zimon 2023-05-24 17:05:21 +02:00
parent b47bfde51b
commit 71eef69b96
2 changed files with 28 additions and 3 deletions

View file

@ -0,0 +1,20 @@
import Modal from '../../admin-x-ds/global/Modal';
import NiceModal from '@ebay/nice-modal-react';
const UserDetailModal = NiceModal.create(() => {
return (
<Modal
size='lg'
title='User details'
onOk={() => {
alert('Clicked OK');
}}
>
<div className='py-4'>
Some user details
</div>
</Modal>
);
});
export default UserDetailModal;

View file

@ -6,15 +6,20 @@ import NiceModal from '@ebay/nice-modal-react';
import React from 'react';
import SettingGroup from '../../../admin-x-ds/settings/SettingGroup';
import TabView from '../../../admin-x-ds/global/TabView';
import UserDetailModal from '../../modals/UserDetailModal';
const Users: React.FC = () => {
const showAddModal = () => {
const showInviteModal = () => {
NiceModal.show(InviteUserModal);
};
const showDetailModal = () => {
NiceModal.show(UserDetailModal);
};
const buttons = (
<Button color='green' label='Invite users' link={true} onClick={() => {
showAddModal();
showInviteModal();
}} />
);
@ -28,7 +33,7 @@ const Users: React.FC = () => {
const admins = (
<List>
<ListItem
action={<Button color='green' label='Edit' link={true} />}
action={<Button color='green' label='Edit' link={true} onClick={showDetailModal} />}
detail='alena@press.com'
hideActions={true}
id='list-item-1'