Skip to content

Commit c228335

Browse files
Merge pull request #769 from inhibitor1217/fix/vstack
VStack 컴포넌트 direction 오류 수정
2 parents 20eba1b + 927978e commit c228335

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* External dependencies */
2+
import React from 'react'
3+
4+
/* Internal dependencies */
5+
import { render } from 'Utils/testUtils'
6+
import HStack from './HStack'
7+
8+
describe('HStack', () => {
9+
it('creates a horizontal flexbox', () => {
10+
const { getByTestId } = render(<HStack testId="h-stack" />)
11+
12+
expect(getByTestId('h-stack')).toHaveStyle('display: flex')
13+
expect(getByTestId('h-stack')).toHaveStyle('flex-direction: row')
14+
})
15+
})
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* External dependencies */
2+
import React from 'react'
3+
4+
/* Internal dependencies */
5+
import { render } from 'Utils/testUtils'
6+
import VStack from './VStack'
7+
8+
describe('VStack', () => {
9+
it('creates a vertical flexbox', () => {
10+
const { getByTestId } = render(<VStack testId="v-stack" />)
11+
12+
expect(getByTestId('v-stack')).toHaveStyle('display: flex')
13+
expect(getByTestId('v-stack')).toHaveStyle('flex-direction: column')
14+
})
15+
})

src/components/Stack/VStack/VStack.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function VStack(
1313
props: VStackProps,
1414
forwardedRef: Ref<HTMLElement>,
1515
) {
16-
return (<Stack ref={forwardedRef} direction="horizontal" {...props} />)
16+
return (<Stack ref={forwardedRef} direction="vertical" {...props} />)
1717
}
1818

1919
export default forwardRef(VStack)

0 commit comments

Comments
 (0)