made eslint happy
This commit is contained in:
parent
90af1ae147
commit
a8064509d0
7 changed files with 58 additions and 71 deletions
|
@ -1,41 +1,40 @@
|
|||
// ThemeDropdown.tsx
|
||||
import React from 'react';
|
||||
import { applyTheme, applyCustomTheme } from './theme';
|
||||
// ThemeDropdown.tsx
|
||||
import React from 'react';
|
||||
|
||||
const ThemeDropdown: React.FC<{
|
||||
selectedTheme: string;
|
||||
setSelectedTheme: (theme: string) => void;
|
||||
}> = ({ selectedTheme, setSelectedTheme }) => {
|
||||
const themeOptions = [
|
||||
{ value: 'IOMARKET', label: 'IOMARKET' },
|
||||
{ value: 'WHITE', label: 'WHITE' },
|
||||
{ value: 'BLACK', label: 'BLACK' },
|
||||
{ value: 'BASIC-CUSTOM', label: 'BASIC-CUSTOM' },
|
||||
{ value: 'CUSTOM', label: 'CUSTOM' },
|
||||
];
|
||||
const ThemeDropdown: React.FC<{
|
||||
selectedTheme: string;
|
||||
setSelectedTheme: (theme: string) => void;
|
||||
}> = ({ selectedTheme, setSelectedTheme }) => {
|
||||
const themeOptions = [
|
||||
{ value: 'IOMARKET', label: 'IOMARKET' },
|
||||
{ value: 'WHITE', label: 'WHITE' },
|
||||
{ value: 'BLACK', label: 'BLACK' },
|
||||
{ value: 'BASIC-CUSTOM', label: 'BASIC-CUSTOM' },
|
||||
{ value: 'CUSTOM', label: 'CUSTOM' },
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="settings-option">
|
||||
<p>Select Theme</p>
|
||||
<select
|
||||
value={selectedTheme}
|
||||
onChange={(e) => {
|
||||
const theme = e.target.value;
|
||||
if (theme !== 'default') {
|
||||
setSelectedTheme(theme);
|
||||
localStorage.setItem('selectedTheme', theme);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<option value="default">Select your style...</option>
|
||||
{themeOptions.map((option) => (
|
||||
<option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
return (
|
||||
<div className="settings-option">
|
||||
<p>Select Theme</p>
|
||||
<select
|
||||
value={selectedTheme}
|
||||
onChange={(e) => {
|
||||
const theme = e.target.value;
|
||||
if (theme !== 'default') {
|
||||
setSelectedTheme(theme);
|
||||
localStorage.setItem('selectedTheme', theme);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<option value="default">Select your style...</option>
|
||||
{themeOptions.map((option) => (
|
||||
<option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ThemeDropdown;
|
||||
export default ThemeDropdown;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue