forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(react): export types for Stack component (carbon-design-system#15456
) * fix(react): export types for Stack component Signed-off-by: Onur Özkardeş <[email protected]> * refactor(react/stack): move type declarations into main component file * fix(stack): get spacing definition from layout instead of icons-react --------- Signed-off-by: Onur Özkardeş <[email protected]> Co-authored-by: Onur Özkardeş <[email protected]> Co-authored-by: Andrea N. Cardona <[email protected]>
- Loading branch information
1 parent
94bad93
commit 9371cc6
Showing
7 changed files
with
65 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2023 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { Stack, StackProps } from './Stack'; | ||
|
||
const HStack = React.forwardRef<React.ReactNode, StackProps>(function HStack( | ||
{ children, ...props }, | ||
ref | ||
) { | ||
return ( | ||
<Stack {...props} ref={ref} orientation="horizontal"> | ||
{children} | ||
</Stack> | ||
); | ||
}); | ||
|
||
export { HStack }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2023 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { Stack, StackProps } from './Stack'; | ||
|
||
const VStack = React.forwardRef<React.ReactNode, StackProps>(function VStack( | ||
props, | ||
ref | ||
) { | ||
return <Stack {...props} ref={ref} orientation="vertical" />; | ||
}); | ||
|
||
export { VStack }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2023 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
export { HStack } from './HStack'; | ||
export { VStack } from './VStack'; | ||
export { Stack, type StackProps } from './Stack'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters