filter themes, adapt labels, adapt default option
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user