File tree Expand file tree Collapse file tree
src/components/Properties Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { useT } from "../../lib/useT" ;
22import type { AlignAxis } from "../../lib/alignment" ;
3-
4- interface IconProps {
5- className ?: string ;
6- }
7-
8- function CenterHIcon ( { className } : IconProps ) {
9- return (
10- < svg viewBox = "0 0 16 16" fill = "none" stroke = "currentColor" aria-hidden = "true" className = { className } >
11- < line x1 = "8" y1 = "1.5" x2 = "8" y2 = "14.5" strokeDasharray = "2 2" strokeWidth = "1" />
12- < rect x = "3" y = "5" width = "10" height = "6" strokeWidth = "1" />
13- </ svg >
14- ) ;
15- }
16-
17- function CenterVIcon ( { className } : IconProps ) {
18- return (
19- < svg viewBox = "0 0 16 16" fill = "none" stroke = "currentColor" aria-hidden = "true" className = { className } >
20- < line x1 = "1.5" y1 = "8" x2 = "14.5" y2 = "8" strokeDasharray = "2 2" strokeWidth = "1" />
21- < rect x = "5" y = "3" width = "6" height = "10" strokeWidth = "1" />
22- </ svg >
23- ) ;
24- }
25-
26- function CenterBothIcon ( { className } : IconProps ) {
27- return (
28- < svg viewBox = "0 0 16 16" fill = "none" stroke = "currentColor" aria-hidden = "true" className = { className } >
29- < line x1 = "8" y1 = "1.5" x2 = "8" y2 = "14.5" strokeDasharray = "2 2" strokeWidth = "1" />
30- < line x1 = "1.5" y1 = "8" x2 = "14.5" y2 = "8" strokeDasharray = "2 2" strokeWidth = "1" />
31- < rect x = "5" y = "5" width = "6" height = "6" strokeWidth = "1" />
32- </ svg >
33- ) ;
34- }
3+ import { CenterHIcon , CenterVIcon , CenterBothIcon } from "./AlignIcons" ;
354
365const BUTTON_CLS =
376 "p-1.5 rounded border border-border text-muted hover:text-text hover:bg-surface-2 transition-colors" ;
Original file line number Diff line number Diff line change 1+ interface IconProps {
2+ className ?: string ;
3+ }
4+
5+ /** Object centred on a vertical dashed line — represents horizontal centring. */
6+ export function CenterHIcon ( { className } : IconProps ) {
7+ return (
8+ < svg viewBox = "0 0 16 16" fill = "none" stroke = "currentColor" aria-hidden = "true" className = { className } >
9+ < line x1 = "8" y1 = "1.5" x2 = "8" y2 = "14.5" strokeDasharray = "2 2" strokeWidth = "1" />
10+ < rect x = "3" y = "5" width = "10" height = "6" strokeWidth = "1" />
11+ </ svg >
12+ ) ;
13+ }
14+
15+ /** Object centred on a horizontal dashed line — represents vertical centring. */
16+ export function CenterVIcon ( { className } : IconProps ) {
17+ return (
18+ < svg viewBox = "0 0 16 16" fill = "none" stroke = "currentColor" aria-hidden = "true" className = { className } >
19+ < line x1 = "1.5" y1 = "8" x2 = "14.5" y2 = "8" strokeDasharray = "2 2" strokeWidth = "1" />
20+ < rect x = "5" y = "3" width = "6" height = "10" strokeWidth = "1" />
21+ </ svg >
22+ ) ;
23+ }
24+
25+ /** Object on the cross-hair of two dashed lines — represents bi-axial centring. */
26+ export function CenterBothIcon ( { className } : IconProps ) {
27+ return (
28+ < svg viewBox = "0 0 16 16" fill = "none" stroke = "currentColor" aria-hidden = "true" className = { className } >
29+ < line x1 = "8" y1 = "1.5" x2 = "8" y2 = "14.5" strokeDasharray = "2 2" strokeWidth = "1" />
30+ < line x1 = "1.5" y1 = "8" x2 = "14.5" y2 = "8" strokeDasharray = "2 2" strokeWidth = "1" />
31+ < rect x = "5" y = "5" width = "6" height = "6" strokeWidth = "1" />
32+ </ svg >
33+ ) ;
34+ }
You can’t perform that action at this time.
0 commit comments