File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change
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
+ } )
Original file line number Diff line number Diff line change
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
+ } )
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ function VStack(
13
13
props : VStackProps ,
14
14
forwardedRef : Ref < HTMLElement > ,
15
15
) {
16
- return ( < Stack ref = { forwardedRef } direction = "horizontal " { ...props } /> )
16
+ return ( < Stack ref = { forwardedRef } direction = "vertical " { ...props } /> )
17
17
}
18
18
19
19
export default forwardRef ( VStack )
You can’t perform that action at this time.
0 commit comments