-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
755 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"gregmat-buddy": minor | ||
--- | ||
|
||
added options page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "https://shadcn-svelte.com/schema.json", | ||
"style": "default", | ||
"tailwind": { | ||
"config": "tailwind.config.ts", | ||
"css": "src/entrypoints/options/app.css", | ||
"baseColor": "slate" | ||
}, | ||
"aliases": { | ||
"components": "@/components", | ||
"utils": "@/utils" | ||
}, | ||
"typescript": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Root from "./option.svelte"; | ||
|
||
export { | ||
Root, | ||
// | ||
Root as Option, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<script lang="ts"> | ||
import { Label } from "@/components/ui/label"; | ||
import { Switch } from "@/components/ui/switch"; | ||
import * as Tooltip from "@/components/ui/tooltip"; | ||
import { CircleHelp } from "lucide-svelte"; | ||
export let id: string; | ||
export let handler: (id: string, checked: boolean) => void; | ||
export let checked: boolean = false; | ||
export let tooltip: string = ""; | ||
let isInitialLoad = true; | ||
$: if (!isInitialLoad) { | ||
handler(id, checked); | ||
} else { | ||
isInitialLoad = false; | ||
} | ||
</script> | ||
|
||
<div class="px-2 flex justify-between"> | ||
<Label for={id} class="my-auto"><slot /></Label> | ||
<div class="flex gap-2 items-center"> | ||
{#if tooltip !== ""} | ||
<Tooltip.Root> | ||
<Tooltip.Trigger> | ||
<CircleHelp size={20} class="stroke-gray-400 dark:stroke-zinc-400" /> | ||
</Tooltip.Trigger> | ||
<Tooltip.Content> | ||
<p>{tooltip}</p> | ||
</Tooltip.Content> | ||
</Tooltip.Root> | ||
{/if} | ||
<Switch {id} bind:checked /> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Root from "./label.svelte"; | ||
|
||
export { | ||
Root, | ||
// | ||
Root as Label, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script lang="ts"> | ||
import { Label as LabelPrimitive } from "bits-ui"; | ||
import { cn } from "@/utils"; | ||
type $$Props = LabelPrimitive.Props; | ||
type $$Events = LabelPrimitive.Events; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<LabelPrimitive.Root | ||
class={cn( | ||
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", | ||
className, | ||
)} | ||
{...$$restProps} | ||
on:mousedown | ||
> | ||
<slot /> | ||
</LabelPrimitive.Root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Root from "./switch.svelte"; | ||
|
||
export { | ||
Root, | ||
// | ||
Root as Switch, | ||
}; |
Oops, something went wrong.