Skip to content

Commit

Permalink
Add Row/Col LayoutPadding prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Vorlias committed Sep 11, 2022
1 parent 3557a55 commit 097f117
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rbxts/zenui-core",
"version": "0.5.8",
"version": "0.5.9",
"description": "",
"main": "out/init.lua",
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions src/Layouts/ColumnView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export interface ColumnProps {
* The horizontal alignment of the contents in this column
*/
readonly HorizontalAlignment?: RoactEnum<Enum.HorizontalAlignment>;

/**
* The padding between items in the column
*/
readonly LayoutPadding?: UDim;
}
/**
* Represents a Column in a `<ColumnView/>` ({@link ColumnView})
Expand Down Expand Up @@ -156,6 +161,7 @@ export class ColumnView extends Roact.Component<ColumnViewProps> {
props.HorizontalAlignment ??
(idx === 0 ? "Left" : idx === count - 1 ? "Right" : "Center")
}
Padding={props.LayoutPadding}
/>
{child}
</View>,
Expand Down
6 changes: 6 additions & 0 deletions src/Layouts/RowView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export interface RowProps {
* The horizontal alignment of the contents in this row
*/
readonly HorizontalAlignment?: RoactEnum<Enum.HorizontalAlignment>;

/**
* The padding between the items in the row
*/
readonly LayoutPadding?: UDim;
}

/**
Expand Down Expand Up @@ -145,6 +150,7 @@ export class RowView extends Roact.Component<RowViewProps> {
(idx === 0 ? "Top" : idx === count - 1 ? "Bottom" : "Center")
}
HorizontalAlignment={props.HorizontalAlignment}
Padding={props.LayoutPadding}
/>
{child}
</View>,
Expand Down

0 comments on commit 097f117

Please sign in to comment.