import { styled } from "goober"; import React from "react"; export type Position = | "bottom right" | "bottom left" | "top right" | "top left" | "right" | "left"; const StyledInspectorButton = styled("button")<{ position: Position }>` position: fixed; width: 2.5rem; height: 2.5rem; background-color: white; box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); margin: 1rem; padding: 0.5rem !important; border: 1px solid #e5e3e4; border-radius: 0.375rem; z-index: 999; ${(props) => { switch (props.position) { case "bottom right": return "bottom: 0; right: 0;"; case "bottom left": return "bottom: 0; left: 0;"; case "top right": return "top: 0; right: 0;"; case "top left": return "top: 0; left: 0;"; case "right": return "right: 0; top: 50%; transform: translateY(-50%);"; case "left": return "left: 0; top: 50%; transform: translateY(-50%);"; default: return ""; } }} `; const JazzIcon = styled("svg")` width: 100%; height: auto; position: relative; left: -1px; color: #146AFF; `; export function InspectorButton({ position = "right", ...buttonProps }: React.ComponentPropsWithoutRef<"button"> & { position?: Position }) { return ( Open Jazz Inspector ); }