-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new toolbar config 'placement' and 'items'
- Loading branch information
Showing
19 changed files
with
313 additions
and
93 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
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
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
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
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
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
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
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
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
packages/fastboard-ui/src/components/Toolbar/definitions/Clear.svelte
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,13 @@ | ||
<script lang="ts"> | ||
import type { Theme } from "../../../typings"; | ||
import Button, { type ButtonProps } from "../../Button"; | ||
import Icons from "../../Icons"; | ||
export let btn_props: Partial<ButtonProps> = {}; | ||
export let content: ButtonProps["content"] | undefined; | ||
export let theme: Theme = "light"; | ||
</script> | ||
|
||
<Button class="clear" {...btn_props} on:click {content}> | ||
<Icons.Clear {theme} /> | ||
</Button> |
19 changes: 19 additions & 0 deletions
19
packages/fastboard-ui/src/components/Toolbar/definitions/Clicker.svelte
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,19 @@ | ||
<script lang="ts"> | ||
import type { ApplianceNames } from "@netless/fastboard-core"; | ||
import type { Theme } from "../../../typings"; | ||
import Button, { type ButtonProps } from "../../Button"; | ||
import Icons from "../../Icons"; | ||
export let btn_props: Partial<ButtonProps> = {}; | ||
export let content: ButtonProps["content"] | undefined; | ||
export let appliance: ApplianceNames | undefined; | ||
export let theme: Theme = "light"; | ||
</script> | ||
|
||
<Button class="clicker" {...btn_props} on:click {content}> | ||
{#if appliance === "clicker"} | ||
<Icons.ClickFilled {theme} active /> | ||
{:else} | ||
<Icons.Click {theme} /> | ||
{/if} | ||
</Button> |
19 changes: 19 additions & 0 deletions
19
packages/fastboard-ui/src/components/Toolbar/definitions/Eraser.svelte
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,19 @@ | ||
<script lang="ts"> | ||
import type { ApplianceNames } from "@netless/fastboard-core"; | ||
import type { Theme } from "../../../typings"; | ||
import Button, { type ButtonProps } from "../../Button"; | ||
import Icons from "../../Icons"; | ||
export let btn_props: Partial<ButtonProps> = {}; | ||
export let content: ButtonProps["content"] | undefined; | ||
export let appliance: ApplianceNames | undefined; | ||
export let theme: Theme = "light"; | ||
</script> | ||
|
||
<Button class="eraser" {...btn_props} on:click {content}> | ||
{#if appliance === "eraser"} | ||
<Icons.EraserFilled {theme} active /> | ||
{:else} | ||
<Icons.Eraser {theme} /> | ||
{/if} | ||
</Button> |
20 changes: 20 additions & 0 deletions
20
packages/fastboard-ui/src/components/Toolbar/definitions/Pencil.svelte
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,20 @@ | ||
<script lang="ts"> | ||
import type { ApplianceNames } from "@netless/fastboard-core"; | ||
import type { Theme } from "../../../typings"; | ||
import Button, { type ButtonProps } from "../../Button"; | ||
import Icons from "../../Icons"; | ||
export let btn_props: Partial<ButtonProps> = {}; | ||
export let content: ButtonProps["content"] | undefined; | ||
export let menu: ButtonProps["menu"] | undefined; | ||
export let appliance: ApplianceNames | undefined; | ||
export let theme: Theme = "light"; | ||
</script> | ||
|
||
<Button class="pencil" {...btn_props} on:click {content} {menu}> | ||
{#if appliance === "pencil"} | ||
<Icons.PencilFilled {theme} active /> | ||
{:else} | ||
<Icons.Pencil {theme} /> | ||
{/if} | ||
</Button> |
19 changes: 19 additions & 0 deletions
19
packages/fastboard-ui/src/components/Toolbar/definitions/Selector.svelte
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,19 @@ | ||
<script lang="ts"> | ||
import type { ApplianceNames } from "@netless/fastboard-core"; | ||
import type { Theme } from "../../../typings"; | ||
import Button, { type ButtonProps } from "../../Button"; | ||
import Icons from "../../Icons"; | ||
export let btn_props: Partial<ButtonProps> = {}; | ||
export let content: ButtonProps["content"] | undefined; | ||
export let appliance: ApplianceNames | undefined; | ||
export let theme: Theme = "light"; | ||
</script> | ||
|
||
<Button class="selector" {...btn_props} on:click {content}> | ||
{#if appliance === "selector"} | ||
<Icons.SelectorFilled {theme} active /> | ||
{:else} | ||
<Icons.Selector {theme} /> | ||
{/if} | ||
</Button> |
Oops, something went wrong.