Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

control buttons styling

AykutSarac77baa95fa9d5
diff --git a/src/pages/editor/LiveEditor/index.tsx b/src/pages/editor/LiveEditor/index.tsx
index a8d55560..72ad7098 100644
--- a/src/pages/editor/LiveEditor/index.tsx
+++ b/src/pages/editor/LiveEditor/index.tsx
@@ -1,6 +1,7 @@
import React from "react";
import styled, { css } from "styled-components";
import ReactFlow, {
+ ControlButton,
Controls,
Elements,
isNode,
@@ -25,6 +26,27 @@ const nodeExtent: NodeExtent = [
const StyledLiveEditor = styled.div`
width: 100%;
height: 100%;
+
+ .react-flow__controls {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ grid-template-rows: repeat(2, 1fr);
+ gap: 8px;
+ right: 10px;
+ left: unset;
+ }
+
+ .react-flow__controls-button {
+ background: ${({ theme }) => theme.BLACK_PRIMARY};
+ fill: ${({ theme }) => theme.SILVER};
+ color: ${({ theme }) => theme.SILVER};
+ font-weight: 600;
+ border: 1px solid ${({ theme }) => theme.BLACK};
+
+ &:hover {
+ background: unset;
+ }
+ }
`;
const onLayout = (
@@ -105,13 +127,11 @@ const LiveEditor: React.FC = () => {
}}
>
<Controls>
- <button
- type="button"
- className="react-flow__controls-button react-flow__controls-zoomin"
+ <ControlButton
onClick={() => onLayout("RL", elements, setElements)}
>
Style
- </button>
+ </ControlButton>
</Controls>
</ReactFlow>
</ReactFlowProvider>