|
| 1 | +<script lang="ts"> |
| 2 | + import { Svelvet, Node, ThemeToggle } from '$lib'; |
| 3 | +</script> |
| 4 | + |
| 5 | +<body> |
| 6 | + <Svelvet controls> |
| 7 | + <Node |
| 8 | + --anchor-color="green" |
| 9 | + --anchor-width="20px" |
| 10 | + --anchor-radius="2px" |
| 11 | + id="node1" |
| 12 | + label="test" |
| 13 | + resizable |
| 14 | + /> |
| 15 | + <Node --node-color="red" --node-border-radius="40px" id="node2" label="test" /> |
| 16 | + <Node label="what" position={{ x: 10, y: 200 }} inputs={3} TD /> |
| 17 | + <ThemeToggle slot="toggle" main="light" alt="custom-theme" /> |
| 18 | + </Svelvet> |
| 19 | +</body> |
| 20 | + |
| 21 | +<style> |
| 22 | + body { |
| 23 | + width: 100vw; |
| 24 | + height: 100vh; |
| 25 | + padding: 0; |
| 26 | + margin: 0; |
| 27 | + } |
| 28 | +
|
| 29 | + :root[svelvet-theme='custom-theme'] { |
| 30 | + --node-color: hsl(225, 30%, 50%); |
| 31 | + --node-border-color: hsl(225, 20%, 40%); |
| 32 | + --node-selection-color: hsl(45, 90%, 60%); |
| 33 | + --text-color: hsl(0, 0%, 100%); |
| 34 | + --node-shadow: var(--shadow-elevation-medium); |
| 35 | +
|
| 36 | + --background-color: hsl(225, 20%, 27%); |
| 37 | + --dot-color: hsl(225, 10%, 50%); |
| 38 | +
|
| 39 | + --accent-color: hsl(45, 90%, 60%); |
| 40 | + --primary-color: hsl(225, 30%, 66%); |
| 41 | +
|
| 42 | + --edge-color: hsl(0, 0%, 100%); |
| 43 | + --target-edge-color: hsl(225, 20%, 40%); |
| 44 | + --edge-shadow: var(--shadow-elevation-medium); |
| 45 | +
|
| 46 | + --anchor-color: hsl(45, 90%, 67%); |
| 47 | + --anchor-border-color: hsl(45, 90%, 87%); |
| 48 | + --anchor-connected: hsl(45, 90%, 100%); |
| 49 | + --anchor-connected-border: hsl(225, 20%, 20%); |
| 50 | +
|
| 51 | + --anchor-connecting: hsl(225, 30%, 40%); |
| 52 | + --anchor-connecting-border: hsl(0, 0%, 100%); |
| 53 | +
|
| 54 | + --anchor-hovering: hsl(225, 20%, 46%); |
| 55 | + --anchor-hovering-border: hsl(0, 0%, 0%); |
| 56 | +
|
| 57 | + --minimap-background-color: hsl(225, 20%, 27%); |
| 58 | +
|
| 59 | + --minimap-node-color: hsl(225, 30%, 20%); |
| 60 | +
|
| 61 | + --controls-background-color: hsl(225, 20%, 27%); |
| 62 | + --controls-text-color: hsl(0, 0%, 100%); |
| 63 | +
|
| 64 | + --theme-toggle-text-color: hsl(0, 0%, 100%); |
| 65 | + --theme-toggle-color: hsl(225, 20%, 27%); |
| 66 | + } |
| 67 | +</style> |
0 commit comments