Added design setting skeleton to AdmiX Settings

refs. https://github.com/TryGhost/Team/issues/3328
This commit is contained in:
Peter Zimon 2023-05-30 19:05:22 +02:00
parent 0e5d66b680
commit 35f7b7058c
3 changed files with 45 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import React, {useContext} from 'react';
import EmailSettings from './settings/email/EmailSettings';
import GeneralSettings from './settings/general/GeneralSettings';
import MembershipSettings from './settings/membership/MembershipSettings';
import SiteSettings from './settings/site/SiteSettings';
import {SettingsContext} from './providers/SettingsProvider';
const Settings: React.FC = () => {
@ -20,6 +21,7 @@ const Settings: React.FC = () => {
return (
<>
<GeneralSettings />
<SiteSettings />
<MembershipSettings />
<EmailSettings />
</>

View File

@ -0,0 +1,28 @@
import Button from '../../../admin-x-ds/global/Button';
import NiceModal from '@ebay/nice-modal-react';
import PreviewModal from '../../../admin-x-ds/global/PreviewModal';
import React from 'react';
import SettingGroup from '../../../admin-x-ds/settings/SettingGroup';
const Design: React.FC = () => {
const openPreviewModal = () => {
NiceModal.show(PreviewModal, {
title: 'Design',
okLabel: 'Save',
preview: 'Here we go',
sidebar: 'And here too'
});
};
return (
<SettingGroup
customButtons={<Button color='green' label='Customize' link onClick={openPreviewModal}/>}
description="Customize your site and manage themes"
title="Branding and design"
>
</SettingGroup>
);
};
export default Design;

View File

@ -0,0 +1,15 @@
import Design from './Design';
import React from 'react';
import SettingSection from '../../../admin-x-ds/settings/SettingSection';
const SiteSettings: React.FC = () => {
return (
<>
<SettingSection title="Site">
<Design />
</SettingSection>
</>
);
};
export default SiteSettings;