From 3bbbbdf3ee0358ec1f06359bf3fb6b60336117b3 Mon Sep 17 00:00:00 2001 From: seveibar Date: Mon, 9 Dec 2024 22:46:31 -0800 Subject: [PATCH] add decorator to simplify examples --- cosmos.decorator.tsx | 3 +++ examples/resistor-and-capacitor.fixture.tsx | 20 +++++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 cosmos.decorator.tsx diff --git a/cosmos.decorator.tsx b/cosmos.decorator.tsx new file mode 100644 index 0000000..ef6ece8 --- /dev/null +++ b/cosmos.decorator.tsx @@ -0,0 +1,3 @@ +export default ({ children }: { children: React.ReactNode }) => ( +
{children}
+) diff --git a/examples/resistor-and-capacitor.fixture.tsx b/examples/resistor-and-capacitor.fixture.tsx index 321ef6b..9e6b3f2 100644 --- a/examples/resistor-and-capacitor.fixture.tsx +++ b/examples/resistor-and-capacitor.fixture.tsx @@ -2,15 +2,13 @@ import { SchematicViewer } from "lib/components/SchematicViewer" import { renderToCircuitJson } from "lib/dev/render-to-circuit-json" export default () => ( -
- - - - - , - )} - /> -
+ + + + + , + )} + /> )