export enum AnchorPosition {
TOP = "top",
TOP_LEFT = "top-left",
TOP_RIGHT = "top-right",
BOTTOM = "bottom",
BOTTOM_LEFT = "bottom-left",
BOTTOM_RIGHT = "bottom-right",
LEFT = "left",
RIGHT = "right",
}
export const AnchorPositionSchema = Schema.Enums(AnchorPosition);
export const BoxToPosition = Effect.fn("BoxToPosition")((
box: BoxContainer,
anchor: AnchorPosition,
) => {
return AnchorPositionSchema.match({
AnchorPosiitoon.TOP = () => ...
AnchorPosiitoon.BOTTOM = () => ...
/* ... */
})
});
export enum AnchorPosition {
TOP = "top",
TOP_LEFT = "top-left",
TOP_RIGHT = "top-right",
BOTTOM = "bottom",
BOTTOM_LEFT = "bottom-left",
BOTTOM_RIGHT = "bottom-right",
LEFT = "left",
RIGHT = "right",
}
export const AnchorPositionSchema = Schema.Enums(AnchorPosition);
export const BoxToPosition = Effect.fn("BoxToPosition")((
box: BoxContainer,
anchor: AnchorPosition,
) => {
return AnchorPositionSchema.match({
AnchorPosiitoon.TOP = () => ...
AnchorPosiitoon.BOTTOM = () => ...
/* ... */
})
});