Files
openmotion/packages/design-system/react/MagnetIcon.tsx
open-design-crew[bot] 21ede9eb81 fix(studio): improve timeline zoom, controls and light editor surfaces (#595)
* fix(studio): clarify timeline selection and composition navigation

* fix(studio): brighten light editor content surfaces

* fix(studio): keep preview transport and side rails white

* fix(studio): simplify light preview title row

* fix(studio): refine preview spacing and panel separators

* fix(studio): preserve timeline zoom proportions and clarify controls

* fix(studio): tighten model picker spacing

* fix(studio): retain track codes and align zoom regression

---------

Co-authored-by: open-design-crew[bot] <299007234+open-design-crew[bot]@users.noreply.github.com>
2026-11-18 18:34:36 +08:00

21 lines
1015 B
TypeScript

import { forwardRef } from "react";
import type { IconProps } from "@phosphor-icons/react";
/** Horseshoe magnet for snapping; shared by all Studio snap controls. */
export const MagnetIcon = forwardRef<SVGSVGElement, IconProps>(function MagnetIcon(
{ size = 16, weight: _weight, alt, mirrored, style, children, ...props }, ref,
) {
return <svg ref={ref} width={size} height={size} viewBox="0 0 24 24" fill="none"
stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round"
aria-hidden={alt ? undefined : true} aria-label={alt} {...props}
style={mirrored ? { ...style, transform: `${style?.transform ?? ""} scaleX(-1)` } : style}>
{alt && <title>{alt}</title>}
{/* Enlarge and center the silhouette without thickening its 2-unit stroke. */}
<g strokeWidth={2 / 1.1} transform="translate(-3.7 1.3) scale(1.1) rotate(45 12 12)">
<path d="M6 3h4v9a2 2 0 0 0 4 0V3h4v9a6 6 0 0 1-12 0V3Z" />
<path d="M6 7h4m4 0h4" />
</g>
{children}
</svg>;
});