kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Improve Stack and HStack components
rodzic
f148cda74a
commit
1309521b9c
|
@ -6,6 +6,7 @@ const justifyContentOptions = {
|
|||
center: 'justify-center',
|
||||
start: 'justify-start',
|
||||
end: 'justify-end',
|
||||
around: 'justify-around',
|
||||
};
|
||||
|
||||
const alignItemsOptions = {
|
||||
|
@ -32,7 +33,7 @@ interface IHStack {
|
|||
/** Extra class names on the <div> element. */
|
||||
className?: string,
|
||||
/** Horizontal alignment of children. */
|
||||
justifyContent?: 'between' | 'center' | 'start' | 'end',
|
||||
justifyContent?: 'between' | 'center' | 'start' | 'end' | 'around',
|
||||
/** Size of the gap between elements. */
|
||||
space?: 0.5 | 1 | 1.5 | 2 | 3 | 4 | 6 | 8,
|
||||
/** Whether to let the flexbox grow. */
|
||||
|
|
|
@ -4,6 +4,7 @@ import React from 'react';
|
|||
type SIZES = 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 10
|
||||
|
||||
const spaces = {
|
||||
0: 'space-y-0',
|
||||
'0.5': 'space-y-0.5',
|
||||
1: 'space-y-1',
|
||||
'1.5': 'space-y-1.5',
|
||||
|
|
Ładowanie…
Reference in New Issue