improve core stack component

This commit is contained in:
xzdry 2022-04-27 14:00:46 +08:00
parent 36ef824714
commit 632e20ff97
2 changed files with 13 additions and 6 deletions

View File

@ -10,10 +10,12 @@ export const RowPropsSpec = {
align: StringUnion(['start', 'center', 'end', 'stretch'], {
title: 'Align',
category: Category.Layout,
description: 'Vertical alignment, same as css align-items',
}),
justify: StringUnion(['start', 'center', 'end', 'space-around', 'space-between'], {
title: 'Justify',
category: Category.Layout,
description: 'Horizontal alignment, same as css justify-content',
})
};

View File

@ -5,10 +5,14 @@ import { Static, Type } from '@sinclair/typebox';
import { StringUnion } from '../../utils/stringUnion';
export const StackPropertySpec = Type.Object({
align: StringUnion(['start', 'end', 'center', 'baseline'], {
title: 'Align Items',
category: 'Layout',
}),
align: StringUnion(
['flex-start', 'flex-end', 'center', 'baseline', 'stretch', 'auto'],
{
title: 'Align',
category: 'Layout',
description: 'Vertical alignment, same as css align-items',
}
),
direction: StringUnion(['vertical', 'horizontal'], {
title: 'Direction',
category: 'Layout',
@ -16,8 +20,9 @@ export const StackPropertySpec = Type.Object({
justify: StringUnion(
['flex-start', 'flex-end', 'center', 'space-between', 'space-around'],
{
title: 'Justify Content',
title: 'Justify',
category: 'Layout',
description: 'Horizontal alignment, same as css justify-content',
}
),
spacing: Type.Number({
@ -77,7 +82,7 @@ export default implementRuntimeComponent({
exampleProperties: {
spacing: 12,
direction: 'horizontal',
align: 'start',
align: 'auto',
wrap: '',
justify: '',
},