Skip to content

Commit

Permalink
fix: fixed instance Stack
Browse files Browse the repository at this point in the history
  • Loading branch information
wootsbot committed Dec 6, 2023
1 parent 8f6a991 commit c8fec69
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 99 deletions.
14 changes: 14 additions & 0 deletions .changeset/strange-rabbits-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@design-blocks/primitives": patch
"@design-blocks/system": patch
"@design-blocks/colors": patch
"@design-blocks/theme": patch
"@design-blocks/types": patch
"@design-blocks/unstyled": patch
"@design-blocks/utils": patch
"@design-blocks/block": patch
"@design-blocks/native": patch
"tsconfig": patch
---

Fixed stacks
3 changes: 2 additions & 1 deletion packages/@blocks-primitives/src/Stack/Stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import { __DEV__ } from '@design-blocks/utils';
import type { StackProps } from './Stack.types';

import { createStack } from './createStack';

const StackBlock = createStack();
function Stack({ ...props }: StackProps) {
const StackBlock = createStack();
return <StackBlock {...props} />;
}
if (__DEV__) {
Expand Down
6 changes: 3 additions & 3 deletions packages/@blocks-primitives/src/Stack/createStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';

import block from '@design-blocks/block';

import { styleFunctionProps, styleFunctionSx } from '@design-blocks/system';
import { StyleFunctionMode, styleFunction } from '@design-blocks/system';
import { __DEV__, camelCase } from '@design-blocks/utils';

import { Box } from '../Box';
Expand Down Expand Up @@ -45,8 +45,8 @@ export function createStack<AdditionalProps extends StackProps = StackProps>() {
alignItems,
justifyContent,
flexWrap,
...styleFunctionProps('Box', theme, { ...styleProps }),
...styleFunctionSx('Box', theme, sx),
...styleFunction('Box', theme, { ...styleProps }, StyleFunctionMode.PROPS),
...styleFunction('Box', theme, sx, StyleFunctionMode.SX),
};
},
);
Expand Down
3 changes: 2 additions & 1 deletion packages/@blocks-primitives/src/XStack/XStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import { createStack } from '../Stack';

import type { StackProps } from '../Stack';

const Stack = createStack();

function XStack({ ...props }: StackProps) {
const Stack = createStack();
return <Stack direction='row' {...props} />;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/@blocks-primitives/src/YStack/YStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { createStack } from '../Stack';

import type { StackProps } from '../Stack';

const Stack = createStack();
function YStack({ ...props }: StackProps) {
const Stack = createStack();
return <Stack direction='column' {...props} />;
}

Expand Down
2 changes: 0 additions & 2 deletions packages/@blocks-system/src/styleFunction/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export * from './getValuesTokens';
export * from './styleFunction';
export * from './validateProperties';
export * from './styleFunctionProps';
export * from './styleFunctionSx';
49 changes: 0 additions & 49 deletions packages/@blocks-system/src/styleFunction/styleFunctionProps.ts

This file was deleted.

42 changes: 0 additions & 42 deletions packages/@blocks-system/src/styleFunction/styleFunctionSx.ts

This file was deleted.

0 comments on commit c8fec69

Please sign in to comment.