-
Notifications
You must be signed in to change notification settings - Fork 0
/
ListLayout.tsx
38 lines (30 loc) · 1.03 KB
/
ListLayout.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
import React from "@rbxts/react";
import { BindingVariants, resolveUDim } from "../utils";
export type ListLayoutProps = BindingVariants<{
padding?: number | UDim
direction?: Enum.FillDirection
order?: Enum.SortOrder
horizontalAlign?: Enum.HorizontalAlignment
verticalAlign?: Enum.VerticalAlignment
flexWrap?: boolean
flexAlignX?: Enum.UIFlexAlignment
flexAlignY?: Enum.UIFlexAlignment
flexAlignItems?: Enum.ItemLineAlignment
}>
export function ListLayout(props: ListLayoutProps) {
return (
<uilistlayout
key={"ListLayout"}
Padding={resolveUDim(props.padding ?? 0)}
FillDirection={props.direction}
SortOrder={props.order}
HorizontalAlignment={props.horizontalAlign}
VerticalAlignment={props.verticalAlign}
// Flex
Wraps={props.flexWrap}
HorizontalFlex={props.flexAlignX}
VerticalFlex={props.flexAlignY}
ItemLineAlignment={props.flexAlignItems}
/>
);
}