Skip to content

Commit

Permalink
fixup! Feat(web-react): Additional parameter for styleProps and Box r…
Browse files Browse the repository at this point in the history
…efactor
  • Loading branch information
curdaj committed Dec 27, 2024
1 parent 27caac4 commit 5f0e8c6
Showing 1 changed file with 0 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,78 +19,6 @@ describe('useBoxStyleProps', () => {
expect(result.current.classProps).toBe('bg-secondary');
});

it('should return padding classProps', () => {
const props: SpiritBoxProps = {
padding: 'space-400',
};
const { result } = renderHook(() => useBoxStyleProps(props));

expect(result.current.classProps).toBe('p-400');
});

it('should return paddingX classProps', () => {
const props: SpiritBoxProps = {
paddingX: 'space-400',
};
const { result } = renderHook(() => useBoxStyleProps(props));

expect(result.current.classProps).toBe('px-400');
});

it('should return paddingY classProps', () => {
const props: SpiritBoxProps = {
paddingY: 'space-400',
};
const { result } = renderHook(() => useBoxStyleProps(props));

expect(result.current.classProps).toBe('py-400');
});

it('should return paddingTop classProps', () => {
const props: SpiritBoxProps = {
paddingTop: 'space-400',
};
const { result } = renderHook(() => useBoxStyleProps(props));

expect(result.current.classProps).toBe('pt-400');
});

it('should return paddingBottom classProps', () => {
const props: SpiritBoxProps = {
paddingBottom: 'space-400',
};
const { result } = renderHook(() => useBoxStyleProps(props));

expect(result.current.classProps).toBe('pb-400');
});

it('should return paddingLeft classProps', () => {
const props: SpiritBoxProps = {
paddingLeft: 'space-400',
};
const { result } = renderHook(() => useBoxStyleProps(props));

expect(result.current.classProps).toBe('pl-400');
});

it('should return paddingRight classProps', () => {
const props: SpiritBoxProps = {
paddingRight: 'space-400',
};
const { result } = renderHook(() => useBoxStyleProps(props));

expect(result.current.classProps).toBe('pr-400');
});

it('should return responsive padding classProps', () => {
const props: SpiritBoxProps = {
padding: { mobile: 'space-400', tablet: 'space-500', desktop: 'space-600' },
};
const { result } = renderHook(() => useBoxStyleProps(props));

expect(result.current.classProps).toBe('p-400 p-tablet-500 p-desktop-600');
});

it('should return border radius classProps', () => {
const props: SpiritBoxProps = {
borderRadius: '200',
Expand Down

0 comments on commit 5f0e8c6

Please sign in to comment.