Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Newfold UI Page/Container components #16

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions components/cacheSettings/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RadioGroup } from "@newfold/ui-component-library";
import { Container, RadioGroup } from "@newfold/ui-component-library";

const CacheSettings = ({ methods, constants, Components }) => {
const [ cacheLevel, setCacheLevel ] = methods.useState(constants.store.cacheLevel);
Expand Down Expand Up @@ -63,7 +63,7 @@ const CacheSettings = ({ methods, constants, Components }) => {
}, [cacheLevel]);

return (
<Components.SectionSettings
<Container.SettingsField
title={constants.text.cacheLevelTitle}
description={constants.text.cacheLevelDescription}
>
Expand Down Expand Up @@ -91,7 +91,7 @@ const CacheSettings = ({ methods, constants, Components }) => {
);
})}
</RadioGroup>
</Components.SectionSettings>
</Container.SettingsField>
);
}

Expand Down
8 changes: 4 additions & 4 deletions components/clearCache/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button } from "@newfold/ui-component-library";
import { Button, Container } from "@newfold/ui-component-library";

const ClearCache = ({ methods, constants, Components }) => {
const ClearCache = ({ methods, constants }) => {

const clearCache = () => {
methods.newfoldPurgeCacheApiFetch(
Expand All @@ -19,7 +19,7 @@ const ClearCache = ({ methods, constants, Components }) => {
};

return (
<Components.SectionSettings
<Container.SettingsField
title={constants.text.clearCacheTitle}
description={constants.text.clearCacheDescription}
>
Expand All @@ -31,7 +31,7 @@ const ClearCache = ({ methods, constants, Components }) => {
>
{constants.text.clearCacheButton}
</Button>
</Components.SectionSettings>
</Container.SettingsField>

);
;}
Expand Down
10 changes: 5 additions & 5 deletions components/performance/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Container } from '@newfold/ui-component-library';
import { default as CacheSettings } from '../cacheSettings/';
import { default as ClearCache } from '../clearCache/';
import { default as defaultText } from './defaultText';
Expand Down Expand Up @@ -37,20 +38,19 @@ const Performance = ({methods, constants, Components, ...props}) => {

return (
<>
<Components.SectionContent separator={true} className={'newfold-cache-settings'}>
<Container.Block separator={true} className={'newfold-cache-settings'}>
<CacheSettings
methods={methods}
constants={constants}
Components={Components}
/>
</Components.SectionContent>
<Components.SectionContent className={'newfold-clear-cache'}>
</Container.Block>
<Container.Block className={'newfold-clear-cache'}>
<ClearCache
methods={methods}
constants={constants}
Components={Components}
/>
</Components.SectionContent>
</Container.Block>
</>
);

Expand Down
Loading