import { _ } from '@evershop/evershop/lib/locale/translate/_'; import React from 'react'; /** * 9-anchor content position picker — a 3×3 dot grid where each cell maps * to a corner / edge / center anchor. Shared across the Slideshow, * Columns, and Banner setting drawers; storefront renderers each carry a * matching `ANCHOR_CLASS` map that converts the anchor to flex * `justify-*` + `items-*` + `text-*` classes. */ export type ContentAnchor = | 'tl' | 'tc' | 'tr' | 'ml' | 'mc' | 'mr' | 'bl' | 'bc' | 'br'; export const ANCHOR_CELLS: ReadonlyArray = [ 'tl', 'tc', 'tr', 'ml', 'mc', 'mr', 'bl', 'bc', 'br' ]; export function AnchorPicker({ value, onChange }: { value: ContentAnchor; onChange: (v: ContentAnchor) => void; }) { return (
{ANCHOR_CELLS.map((c) => { const active = value === c; return ( ); })}
); }