@crossed/ui
Version:
A universal & performant styling library for React Native, Next.js & React
20 lines (17 loc) • 508 B
text/typescript
/**
* Copyright (c) Paymium.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root of this projects source tree.
*/
import { createStyles } from '@crossed/styled';
import { SpaceName } from '@crossed/theme';
export const gapStyles = createStyles(({ space }) =>
(Object.keys(space) as SpaceName[]).reduce(
(acc, spaceName) => {
acc[spaceName] = { base: { 'gap': space[spaceName] } };
return acc;
},
{} as Record<SpaceName, any>
)
);