mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-29 19:14:22 -05:00
32 lines
600 B
TypeScript
32 lines
600 B
TypeScript
import React, { type CSSProperties, type ReactNode } from 'react';
|
|
|
|
import { View } from './View';
|
|
|
|
type SpaceBetweenProps = {
|
|
direction?: 'horizontal' | 'vertical';
|
|
gap?: number;
|
|
style?: CSSProperties;
|
|
children: ReactNode;
|
|
};
|
|
|
|
export const SpaceBetween = ({
|
|
direction = 'horizontal',
|
|
gap = 15,
|
|
style,
|
|
children,
|
|
}: SpaceBetweenProps) => {
|
|
return (
|
|
<View
|
|
style={{
|
|
flexWrap: 'wrap',
|
|
flexDirection: direction === 'horizontal' ? 'row' : 'column',
|
|
alignItems: 'center',
|
|
gap,
|
|
...style,
|
|
}}
|
|
>
|
|
{children}
|
|
</View>
|
|
);
|
|
};
|