refactor(styles): move styles for additional components into their own packages

This commit is contained in:
Christopher Möller
2022-07-21 14:26:09 +02:00
parent 2d2bbcc8df
commit c17ac0a9e5
6 changed files with 43 additions and 57 deletions

View File

@@ -15,6 +15,8 @@ import UnlockIcon from './Icons/Unlock';
import { ControlProps, ControlButtonProps } from './types';
import './style.css';
export const ControlButton: FC<PropsWithChildren<ControlButtonProps>> = ({
children,
className,

View File

@@ -0,0 +1,32 @@
.react-flow__controls {
box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08);
position: absolute;
z-index: 5;
bottom: 20px;
left: 15px;
&-button {
border: none;
background: #fefefe;
border-bottom: 1px solid #eee;
box-sizing: content-box;
display: flex;
justify-content: center;
align-items: center;
width: 16px;
height: 16px;
cursor: pointer;
user-select: none;
padding: 5px;
svg {
width: 100%;
max-width: 12px;
max-height: 12px;
}
&:hover {
background: #f4f4f4;
}
}
}

View File

@@ -144,32 +144,6 @@
pointer-events: all;
}
/* additional components */
.react-flow__controls {
position: absolute;
z-index: 5;
bottom: 20px;
left: 15px;
&-button {
width: 24px;
height: 24px;
border: none;
svg {
width: 100%;
}
}
}
.react-flow__minimap {
position: absolute;
z-index: 5;
bottom: 20px;
right: 15px;
}
.react-flow__attribution {
font-size: 10px;
position: absolute;

View File

@@ -98,34 +98,3 @@
cursor: crosshair;
}
}
.react-flow__minimap {
background-color: #fff;
}
.react-flow__controls {
box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08);
&-button {
background: #fefefe;
border-bottom: 1px solid #eee;
box-sizing: content-box;
display: flex;
justify-content: center;
align-items: center;
width: 16px;
height: 16px;
cursor: pointer;
user-select: none;
padding: 5px;
svg {
max-width: 12px;
max-height: 12px;
}
&:hover {
background: #f4f4f4;
}
}
}

View File

@@ -13,6 +13,8 @@ import MiniMapNode from './MiniMapNode';
import MiniMapDrag from './MiniMapDrag';
import { MiniMapProps, GetMiniMapNodeAttribute } from './types';
import './style.css';
declare const window: any;
const defaultWidth = 200;

View File

@@ -0,0 +1,7 @@
.react-flow__minimap {
background-color: #fff;
position: absolute;
z-index: 5;
bottom: 20px;
right: 15px;
}