add theme selector

This commit is contained in:
SethBurkart123
2023-11-02 16:13:45 +11:00
parent 5c23ba0381
commit 46e86b9643
4 changed files with 23 additions and 2 deletions
@@ -0,0 +1,18 @@
const downloadTheme = (themeName: string, themeURL: string) => {
// send message to the background script
chrome.runtime.sendMessage({
type: 'currentTab',
info: 'SetTheme',
body: {
themeName: themeName,
themeURL: themeURL
}
});
}
export default function ThemeSelector() {
return (
<button onClick={() => downloadTheme('Dark', 'https://raw.githubusercontent.com/SethBurkart123/BetterSEQTA-Themes/main/themes/test.json')}>Dark</button>
)
}
+2
View File
@@ -1,11 +1,13 @@
import { FC } from 'react';
import BackgroundSelector from '../components/BackgroundSelector';
import ThemeSelector from '../components/ThemeSelector';
const Themes: FC = () => {
return (
<div>
<BackgroundSelector />
<ThemeSelector />
</div>
);
};