Skip to content

Commit ccd78e3

Browse files
committed
feat(terracotta): route shared UI dispatchers to terracotta variants
1 parent be7d9e7 commit ccd78e3

6 files changed

Lines changed: 18 additions & 24 deletions

File tree

src/components/CodeModal.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ import React from 'react';
22
import { useVisualSettings } from '../context/VisualSettingsContext';
33
import BrutalistCodeModal from './BrutalistCodeModal';
44
import LuxeCodeModal from './LuxeCodeModal';
5+
import TerracottaCodeModal from './TerracottaCodeModal';
56

67
const CodeModal = (props) => {
78
const { fezcodexTheme } = useVisualSettings();
89

9-
if (fezcodexTheme === 'luxe') {
10-
return <LuxeCodeModal {...props} />;
11-
}
12-
10+
if (fezcodexTheme === 'luxe') return <LuxeCodeModal {...props} />;
11+
if (fezcodexTheme === 'terracotta') return <TerracottaCodeModal {...props} />;
1312
return <BrutalistCodeModal {...props} />;
1413
};
1514

src/components/CommandPalette.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ import React from 'react';
22
import { useVisualSettings } from '../context/VisualSettingsContext';
33
import BrutalistCommandPalette from './BrutalistCommandPalette';
44
import LuxeCommandPalette from './LuxeCommandPalette';
5+
import TerracottaCommandPalette from './TerracottaCommandPalette';
56

67
const CommandPalette = (props) => {
78
const { fezcodexTheme } = useVisualSettings();
89

9-
if (fezcodexTheme === 'luxe') {
10-
return <LuxeCommandPalette {...props} />;
11-
}
12-
10+
if (fezcodexTheme === 'luxe') return <LuxeCommandPalette {...props} />;
11+
if (fezcodexTheme === 'terracotta') return <TerracottaCommandPalette {...props} />;
1312
return <BrutalistCommandPalette {...props} />;
1413
};
1514

src/components/GenericModal.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ import React from 'react';
22
import { useVisualSettings } from '../context/VisualSettingsContext';
33
import BrutalistModal from './BrutalistModal';
44
import LuxeModal from './LuxeModal';
5+
import TerracottaModal from './TerracottaModal';
56

67
const GenericModal = (props) => {
78
const { fezcodexTheme } = useVisualSettings();
89

9-
if (fezcodexTheme === 'luxe') {
10-
return <LuxeModal {...props} />;
11-
}
12-
10+
if (fezcodexTheme === 'luxe') return <LuxeModal {...props} />;
11+
if (fezcodexTheme === 'terracotta') return <TerracottaModal {...props} />;
1312
return <BrutalistModal {...props} />;
1413
};
1514

src/components/ImageModal.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ import React from 'react';
22
import { useVisualSettings } from '../context/VisualSettingsContext';
33
import BrutalistImageModal from './BrutalistImageModal';
44
import LuxeImageModal from './LuxeImageModal';
5+
import TerracottaImageModal from './TerracottaImageModal';
56

67
const ImageModal = (props) => {
78
const { fezcodexTheme } = useVisualSettings();
89

9-
if (fezcodexTheme === 'luxe') {
10-
return <LuxeImageModal {...props} />;
11-
}
12-
10+
if (fezcodexTheme === 'luxe') return <LuxeImageModal {...props} />;
11+
if (fezcodexTheme === 'terracotta') return <TerracottaImageModal {...props} />;
1312
return <BrutalistImageModal {...props} />;
1413
};
1514

src/components/Search.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ import React from 'react';
22
import { useVisualSettings } from '../context/VisualSettingsContext';
33
import BrutalistSearch from './BrutalistSearch';
44
import LuxeSearch from './LuxeSearch';
5+
import TerracottaSearch from './TerracottaSearch';
56

67
const Search = (props) => {
78
const { fezcodexTheme } = useVisualSettings();
89

9-
if (fezcodexTheme === 'luxe') {
10-
return <LuxeSearch {...props} />;
11-
}
12-
10+
if (fezcodexTheme === 'luxe') return <LuxeSearch {...props} />;
11+
if (fezcodexTheme === 'terracotta') return <TerracottaSearch {...props} />;
1312
return <BrutalistSearch {...props} />;
1413
};
1514

src/components/SidePanel.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ import React from 'react';
22
import { useVisualSettings } from '../context/VisualSettingsContext';
33
import BrutalistSidePanel from './BrutalistSidePanel';
44
import LuxeSidePanel from './LuxeSidePanel';
5+
import TerracottaSidePanel from './TerracottaSidePanel';
56

67
const SidePanel = (props) => {
78
const { fezcodexTheme } = useVisualSettings();
89

9-
if (fezcodexTheme === 'luxe') {
10-
return <LuxeSidePanel {...props} />;
11-
}
12-
10+
if (fezcodexTheme === 'luxe') return <LuxeSidePanel {...props} />;
11+
if (fezcodexTheme === 'terracotta') return <TerracottaSidePanel {...props} />;
1312
return <BrutalistSidePanel {...props} />;
1413
};
1514

0 commit comments

Comments
 (0)