-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4be3bc
commit 310857e
Showing
12 changed files
with
348 additions
and
362 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,68 @@ | ||
# Stack | ||
|
||
API documentation for the React Native Stack component. Learn about the available props. | ||
|
||
## Import | ||
|
||
```js | ||
import { Stack } from "@react-native-material/core"; | ||
// or | ||
import Stack from "@react-native-material/core/Stack"; | ||
``` | ||
|
||
## Props | ||
|
||
```ts | ||
interface StackProps extends ViewProps { | ||
/** | ||
* The direction of the stack. | ||
* - `column` - Vertical stack. | ||
* - `row` - Horizontal stack. | ||
* - `row-reverse` - Horizontal stack with reverse order of children. | ||
* - `column-reverse` - Vertical stack with reverse order of children. | ||
* | ||
* @default "column" | ||
*/ | ||
direction?: ViewStyle["flexDirection"]; | ||
|
||
/** | ||
* The alignment of the stack items along the stack's main axis. | ||
* | ||
* @default "flex-start" | ||
*/ | ||
justify?: ViewStyle["justifyContent"]; | ||
|
||
/** | ||
* The alignment of the stack items along the stack's cross axis. | ||
* | ||
* @default "stretch" | ||
*/ | ||
align?: ViewStyle["alignItems"]; | ||
|
||
/** | ||
* Whether the stack items forced in a single line or can be flowed into multiple lines. | ||
* | ||
* @default "nowrap" | ||
*/ | ||
wrap?: ViewStyle["flexWrap"]; | ||
|
||
/** | ||
* The spacing between the stack items. | ||
* | ||
* @default 0 | ||
*/ | ||
spacing?: number; | ||
|
||
/** | ||
* A React.Node to render between each stack item. | ||
* | ||
* @default 0 | ||
*/ | ||
divider?: React.ReactNode; | ||
} | ||
|
||
export function getValidChildren(children: React.ReactNode) { | ||
return React.Children.toArray(children).filter(child => React.isValidElement(child)) as React.ReactElement[]; | ||
} | ||
|
||
``` |
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
Oops, something went wrong.
310857e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
react-native-material – ./docs
www.react-native-material.com
react-native-material-git-main-yamankatby.vercel.app
react-native-material.com
react-native-material.vercel.app
react-native-material-yamankatby.vercel.app
310857e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
react-native-material-example – ./example
react-native-material-example-yamankatby.vercel.app
react-native-material-example-git-main-yamankatby.vercel.app
react-native-material-example.vercel.app
example.react-native-material.com