Skip to content

Commit

Permalink
fix(nrplus): bigger diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Nov 28, 2023
1 parent 223561e commit c5a0c07
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/NRPlusGatewayTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const NRPlusGatewayTile = ({ gateway }: { gateway: NRPlusGateway }) => {
<>
<NRPlusTopology
topology={gateway.state.topology}
size={{ width: 250, height: 100 }}
size={{ width: 250, height: 150 }}
/>
</>
)}
Expand Down
36 changes: 22 additions & 14 deletions src/nrplus/TopologyApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,29 @@ export const App = () => {
return (
<div class="container">
<div class="row">
<main class="col-8">
<NRPlusTopology
topology={parsedTopology}
size={{ width: 250, height: 150 }}
showHelpers
/>
<main class="col-4">
<div class="m-4">
<NRPlusTopology
topology={parsedTopology}
size={{ width: 250, height: 150 }}
showHelpers
/>
<div class="mt-4">
<textarea
onInput={(e) =>
setTopology((e.target as HTMLInputElement).value)
}
value={topology}
rows={topology.split('\n').length}
cols={Math.max(...topology.split('\n').map((s) => s.length))}
></textarea>
</div>
</div>
</main>
<aside class="col-4 text-white">
<textarea
onInput={(e) => setTopology((e.target as HTMLInputElement).value)}
value={topology}
rows={topology.split('\n').length}
></textarea>

<pre>{JSON.stringify({ topology: parsedTopology }, null, 2)}</pre>
<aside class="col-8 text-white">
<pre class="m-4">
{JSON.stringify({ topology: parsedTopology }, null, 2)}
</pre>
</aside>
</div>
</div>
Expand Down

0 comments on commit c5a0c07

Please sign in to comment.