Skip to content

Commit

Permalink
feat: options page
Browse files Browse the repository at this point in the history
  • Loading branch information
jaem1n207 committed May 7, 2024
1 parent e0eeb6c commit ae98006
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"react-hooks/exhaustive-deps": "error",
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "off",
"react/no-unknown-property": "off",
"@typescript-eslint/no-explicit-any": "off",
},
}
6 changes: 6 additions & 0 deletions shim.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import type { AttributifyAttributes } from '@unocss/preset-attributify';
import type { ProtocolWithReturn } from 'webext-bridge';

declare module 'react' {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface HTMLAttributes<T> extends AttributifyAttributes {}
}

declare module 'webext-bridge' {
export interface ProtocolMap {
// define message protocol types
Expand Down
13 changes: 6 additions & 7 deletions src/options/Options.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import { AppearanceSwitch } from '~/features/theme';
import { ThemeCustomizer } from '~/widgets/theme';
import IconSliders from '~icons/pixelarticons/sliders';
import IconZap from '~icons/pixelarticons/zap';

const Options = () => {
return (
<main className="px-4 py-10 text-center transition-colors">
<main className="flex-1">
<div border="x-2" text="sm white primary/90" className="container relative">
<section className="mx-auto py-2 max-w-screen-lg flex flex-col items-center gap-2 md:pb-8 lg:pb-20">
<h1 className="text-center text-3xl">Dynamic Scrollbar Options</h1>
</section>
</div>
<IconSliders className="icon-btn mx-2 text-2xl" />
<div>Options</div>
<p className="mt-2 opacity-50">This is the options page</p>
<ThemeCustomizer />
<AppearanceSwitch />

<div className="mt-4 flex items-center">
Powered by Vite <IconZap className="align-middle" />
</div>
</main>
);
};
Expand Down
12 changes: 6 additions & 6 deletions unocss.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export default defineConfig({
},
],
],
shortcuts: [
{
'icon-btn':
'text-size-sm inline-block cursor-pointer select-none opacity-75 transition-color hover:opacity-100 hover:color-primary/90',
},
],
shortcuts: {
'icon-btn':
'text-size-sm inline-block cursor-pointer select-none opacity-75 transition-color hover:opacity-100 hover:color-primary/90',
container:
'w-full mx-auto px-8 sm:max-w-screen-sm md:max-w-screen-md lg:max-w-screen-lg xl:max-w-screen-xl 2xl:max-w-screen-2xl',
},
transformers: [transformerDirectives()],
});

0 comments on commit ae98006

Please sign in to comment.