Skip to content

Commit

Permalink
Merge pull request #16 from newfold-labs/update/use-newfold-ui-contai…
Browse files Browse the repository at this point in the history
…ner-component

Use Newfold UI Page/Container components
  • Loading branch information
wpalani authored Dec 4, 2023
2 parents f5cf592 + b51f35b commit 4ac17a7
Show file tree
Hide file tree
Showing 5 changed files with 827 additions and 29 deletions.
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

0 comments on commit 4ac17a7

Please sign in to comment.