Feat: dark mode (#3652)

* feat(react/svelte): add dark mode defaults

* refactor(darkmode): minimap, edges, edge labels

* chore(style): edge label color

* feat(colorMode): add colorMode prop light/dark/system

* chore(examples): cleanup

* test(colorMode): add tests

* chore(base.css): add dark base

* chore(examples): cleanup
This commit is contained in:
Moritz Klack
2023-11-23 12:15:36 +01:00
committed by GitHub
parent 74c82272aa
commit ab5eef220f
38 changed files with 474 additions and 83 deletions
@@ -6,9 +6,9 @@
export let width: number = 0;
export let height: number = 0;
export let borderRadius: number = 5;
export let color: string;
export let color: string | undefined = undefined;
export let shapeRendering: string;
export let strokeColor: string;
export let strokeColor: string | undefined = undefined;
export let strokeWidth: number = 2;
export let selected: boolean = false;
let className: string = '';
@@ -24,8 +24,8 @@
ry={borderRadius}
{width}
{height}
fill={color}
stroke={strokeColor}
stroke-width={strokeWidth}
style={`${color ? `fill: ${color};` : ''}${strokeColor ? `stroke: ${strokeColor};` : ''}${
strokeWidth ? `stroke-width: ${strokeWidth};` : ''
}`}
shape-rendering={shapeRendering}
/>