-
Notifications
You must be signed in to change notification settings - Fork 0
/
GridLayout.tsx
40 lines (36 loc) · 1.24 KB
/
GridLayout.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React from "@rbxts/react";
import type { BindingVariants } from "../utils";
export type GridLayoutProps = BindingVariants<{
cellPadding?: UDim2
cellSize?: UDim2
cellAspectRatio?: number
cellAspectType?: Enum.AspectType
cellAspectAxis?: Enum.DominantAxis
startCorner?: Enum.StartCorner
direction?: Enum.FillDirection
horizontalAlign?: Enum.HorizontalAlignment
verticalAlign?: Enum.VerticalAlignment,
sortOrder?: Enum.SortOrder;
}>
export function GridLayout(props: GridLayoutProps) {
return (
<uigridlayout
key={"GridLayout"}
CellPadding={props.cellPadding}
CellSize={props.cellSize}
StartCorner={props.startCorner}
FillDirection={props.direction}
HorizontalAlignment={props.horizontalAlign}
VerticalAlignment={props.verticalAlign}
SortOrder={props.sortOrder}
>
{props.cellAspectRatio !== undefined
? <uiaspectratioconstraint
AspectRatio={props.cellAspectRatio}
DominantAxis={props.cellAspectAxis}
AspectType={props.cellAspectType}
/>
: undefined}
</uigridlayout>
);
}