-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from GeekyAnts/releases/3.0.7
Releases/3.0.7
- Loading branch information
Showing
177 changed files
with
11,519 additions
and
21 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
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
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
File renamed without changes.
File renamed without changes.
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,4 @@ | ||
--- | ||
id: interaction-styles | ||
title: Adding pressed, hover and focus styles | ||
--- |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,54 @@ | ||
--- | ||
id: view | ||
title: View | ||
--- | ||
|
||
A generic [`View`](https://reactnative.dev/docs/view) from [React Native](https://reactnative.dev/docs/view) | ||
|
||
## Implements | ||
|
||
- [`View`](https://reactnative.dev/docs/view) from [`React Native`](https://reactnative.dev) | ||
- [`color`](https://styled-system.com/api/#color), [`space`](https://styled-system.com/api/#space), [`layout`](https://styled-system.com/api/#layout), [`flexbox`](https://styled-system.com/api/#flexbox), [`position`](https://styled-system.com/api/#flexbox) & [`border`](https://styled-system.com/api/#border) from [`style-system`](https://styled-system.com/) | ||
|
||
## Example | ||
|
||
### Basic | ||
|
||
```SnackPlayer name=View%20Example | ||
import React from "react"; | ||
import { Text, VStack, NativeBaseProvider, View, Center } from "native-base"; | ||
function ViewComponent() { | ||
return ( | ||
<View | ||
size={48} | ||
bg="emerald.400" | ||
justifyContent="center" | ||
alignItems="center" | ||
rounded="md" | ||
> | ||
<Text color="white">This is a View</Text> | ||
</View> | ||
); | ||
} | ||
// Example template which wraps component with NativeBaseProvider | ||
export default function () { | ||
return ( | ||
<NativeBaseProvider> | ||
<Center flex={1}> | ||
<ViewComponent /> | ||
</Center> | ||
</NativeBaseProvider> | ||
); | ||
} | ||
``` | ||
|
||
## Props | ||
|
||
| Name | Type | Description | Default | | ||
| ------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | ------- | | ||
| shadow | number | Applies box shadow and accepts a number from 0 to 9 | - | | ||
| style | stylesheet | Applies user-defined styles and accepts a stylesheet. | - | | ||
| children | JSX.Element | Renders components as Box children. Accepts a JSX.Element or an array of JSX.Element. | - | | ||
| SafeAreaProps | [SafeAreaProps](safe-area-view-props.md) | Renders components as Box children. Accepts a JSX.Element or an array of JSX.Element. | - | |
File renamed without changes.
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,44 @@ | ||
--- | ||
id: FAB | ||
title: FAB | ||
--- | ||
|
||
import { ComponentTheme } from '../../src/components'; | ||
|
||
A floating action button is a circular icon button that hovers over content to promote a primary action in the application. | ||
|
||
## Import | ||
|
||
```jsx | ||
import { Fab } from 'native-base'; | ||
``` | ||
|
||
## Example | ||
|
||
### Basic | ||
|
||
```ComponentSnackPlayer path=composites,Fab,Basic.tsx | ||
|
||
``` | ||
|
||
### Placement | ||
|
||
```ComponentSnackPlayer path=composites,Fab,Placement.tsx | ||
|
||
``` | ||
|
||
### Custom Position | ||
|
||
```ComponentSnackPlayer path=composites,Fab,CustomPosition.tsx | ||
|
||
``` | ||
|
||
## Styling | ||
|
||
<ComponentTheme name="fab" componentName="FAB" /> | ||
|
||
## Props | ||
|
||
```ComponentPropTable path=composites,Fab,Fab.tsx | ||
|
||
``` |
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,24 @@ | ||
--- | ||
id: VStack | ||
title: VStack / Column | ||
--- | ||
|
||
`VStack` aligns items vertically.`Column` is also an alias for `VStack`. | ||
|
||
## Import | ||
|
||
```jsx | ||
import { VStack } from 'native-base'; | ||
``` | ||
|
||
## Usage | ||
|
||
```ComponentSnackPlayer path=primitives,VStack,basic.tsx | ||
|
||
``` | ||
|
||
## Props | ||
|
||
```ComponentPropTable path=primitives,Stack,VStack.tsx | ||
|
||
``` |
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 @@ | ||
`ZStack` aligns items absolutely in the z-axis. | ||
|
||
## Examples | ||
|
||
### Basic | ||
|
||
```ComponentSnackPlayer path=primitives,ZStack,example.tsx | ||
|
||
``` | ||
|
||
### Items Centered | ||
|
||
You can pass `alignItems="center"` `justifyContent="center"` to vertically and horizontally center the children. | ||
|
||
```ComponentSnackPlayer path=primitives,ZStack,CenterStack.tsx | ||
|
||
``` | ||
|
||
## Props | ||
|
||
```ComponentPropTable path=primitives,ZStack,index.tsx | ||
|
||
``` |
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,24 @@ | ||
--- | ||
id: accessibility | ||
title: Accessibility | ||
--- | ||
|
||
NativeBase comes with the latest accessibility standards out of the box including aria and role attributes, focus management, and keyboard navigation. | ||
|
||
## Accessible Roles | ||
|
||
NativeBase uses [React Native ARIA](https://react-native-aria.geekyants.com/) to implements [WAI-ARIA](https://www.w3.org/TR/wai-aria-1.2/) standards to its components. This is designed to provide meaning for controls that aren't built using components provided by the platform. | ||
|
||
## Accessible Labels | ||
|
||
When a view is marked as accessible, it is a good practice to set an `accessibilityLabel` on the view, so that people who use voice-over know what element they have selected. Voice-over will read this string when a user selects the associated element. NativeBase with the use of [React Native ARIA](https://www.notion.so/Accessibility-83852d7c4b094e69a3e4f1047994bd1c) does this for you out of the box. | ||
|
||
## Keyboard Navigation | ||
|
||
Many complex components, like Tabs and Dialog, come with expectations from users on how to interact with their content using a keyboard or other non-mouse input modalities. NativeBase Primitives provide basic keyboard support in accordance with the [WAI-ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.2/). | ||
|
||
## Focus Management | ||
|
||
Proper keyboard navigation and good labelling often go hand-in-hand with managing focus. When a user interacts with a component and something changes as a result, it's often helpful to move focus with the interaction. And for screen reader users, moving focus often results in an announcement to convey the new context, which relies on proper labelling. | ||
|
||
In many NativeBase Components, we move focus based on the interactions a user normally takes in a given component. For example, in `Modal`, when the modal is opened, the focus is programmatically moved to the `first focusable element` and trapped inside the modal to anticipate a response to the prompt. |
Oops, something went wrong.