filter themes, adapt labels, adapt default option

This commit is contained in:
martin-mfg
2025-11-08 20:27:42 +01:00
parent ffda71597a
commit 0f816c0508
3 changed files with 30 additions and 18 deletions
@@ -20,8 +20,8 @@ const StatsRankSection = ({ selectedOption, setSelectedOption }) => {
];
return (
<Section title="Rank Style">
<p>Select a rank style.</p>
<Section title="Progress Style">
<p>Select a progress style.</p>
<Input
options={options}
selectedOption={selectedOption || DEFAULT_OPTION}
@@ -15,8 +15,8 @@ const SelectCardStage = ({ selectedCard, setSelectedCard, setImageSrc }) => {
title: 'GitHub Stats Card',
description: 'your overall GitHub statistics',
imageSrc: `?&username=${userId}`,
demoCustomization: '&include_all_commits=true',
cardType: 'stats',
demoCustomization: '',
},
{
title: 'Top Languages Card',
@@ -9,21 +9,33 @@ import { themes } from '../../../backend/themes/index';
const ThemeStage = ({ theme, setTheme, fullSuffix }) => {
return (
<div className="flex flex-wrap">
{Object.keys(themes).map((myTheme, index) => (
<button
className="p-2 lg:p-4"
key={index}
type="button"
onClick={() => setTheme(myTheme)}
>
<Card
title={myTheme}
description=""
imageSrc={`${fullSuffix}&theme=${myTheme}`}
selected={theme === myTheme}
/>
</button>
))}
{Object.keys(themes)
.filter(
(myTheme) =>
![
'merko',
'blue-green',
'gotham',
'blueberry',
'outrun',
'holi',
].includes(myTheme),
)
.map((myTheme, index) => (
<button
className="p-2 lg:p-4"
key={index}
type="button"
onClick={() => setTheme(myTheme)}
>
<Card
title={myTheme}
description=""
imageSrc={`${fullSuffix}&theme=${myTheme}`}
selected={theme === myTheme}
/>
</button>
))}
</div>
);
};