Skip to content

Commit

Permalink
Add toggleswitch styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Corb3nik committed Sep 10, 2024
1 parent 05b8680 commit b280780
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/primevue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@caido/primevue",
"version": "0.0.3",
"version": "0.0.4",
"description": "Primevue themes for Caido",
"main": "dist/primevue.mjs",
"types": "dist/types/index.d.ts",
Expand Down
18 changes: 18 additions & 0 deletions packages/primevue/src/classic/components/toggleswitch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {defineComponent} from "./utils";

export default defineComponent({
tokens: {
toggleswitch: {
colorScheme: {
dark: {
root: {
checkedBackground: "{secondary.color}",
checkedHoverBackground: "{secondary.hover.color}",
}
}
}
},
},
passthrough: {
}
});
3 changes: 3 additions & 0 deletions packages/primevue/src/classic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import column from "./components/column";
import checkbox from "./components/checkbox";
import contextmenu from "./components/contextmenu";
import tabs from "./components/tabs";
import toggleswitch from "./components/toggleswitch";

export const ClassicTheme = definePreset(Aura, {
primitive: {
Expand Down Expand Up @@ -151,6 +152,7 @@ export const ClassicTheme = definePreset(Aura, {
...checkbox.tokens,
...contextmenu.tokens,
...tabs.tokens,
...toggleswitch.tokens,
}
});

Expand All @@ -163,4 +165,5 @@ export const ClassicThemePassthrough = {
...checkbox.passthrough,
...contextmenu.passthrough,
...tabs.passthrough,
...toggleswitch.passthrough,
} as const

0 comments on commit b280780

Please sign in to comment.