import { AnimatedMinusIcon } from "@domicile-desktop/component-library/AnimatedMinusIcon"; import { AnimatedPlusIcon } from "@domicile-desktop/component-library/AnimatedPlusIcon"; import { Button } from "@domicile-desktop/component-library/Button"; import { css } from "../../styled-system/css"; import { hstack } from "../../styled-system/patterns"; import { isFullyZoomedIn, isFullyZoomedOut, isUnzoomed, zoomPercent, } from "./zoom-steps"; type Props = { onZoomIn: () => void; onZoomOut: () => void; onZoomReset: () => void; /** The page zoom factor; 1 is 100%. */ zoom: number; }; /** * A page's zoom, as Chrome's zoom bubble shows it: the level between − and +, * and Reset, in one row. * * Its buttons gray out without the `disabled` attribute: the browser drops * focus off a button as it gets one, and the popup this sits in closes when * focus falls out of it. Reset grays out the moment it is pressed. */ export const ZoomPanel = ({ onZoomIn, onZoomOut, onZoomReset, zoom, }: Props) => (