-
Notifications
You must be signed in to change notification settings - Fork 123
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 #1682 from gluestack/release/@gluestack-ui/themed@…
…1.0.39 Release/@gluestack UI/[email protected]
- Loading branch information
Showing
20 changed files
with
232 additions
and
1 deletion.
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
11 changes: 11 additions & 0 deletions
11
...storybook/src/ui/react-native-components/InputAcessoryView/InputAccessoryView.stories.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,11 @@ | ||
import type { ComponentMeta } from '@storybook/react-native'; | ||
import InputAccessoryViewStory from './InputAccessoryView'; | ||
|
||
const InputAccessoryViewMeta: ComponentMeta<typeof ScrollView> = { | ||
title: 'stories/React Native Components/InputAccessoryView', | ||
component: InputAccessoryViewStory, | ||
}; | ||
|
||
export default InputAccessoryViewMeta; | ||
|
||
export { InputAccessoryView }; |
46 changes: 46 additions & 0 deletions
46
example/storybook/src/ui/react-native-components/InputAcessoryView/InputAccessoryView.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,46 @@ | ||
import { | ||
ScrollView, | ||
Button, | ||
ButtonText, | ||
Center, | ||
Input, | ||
InputAccessoryView, | ||
} from '@gluestack-ui/themed'; | ||
import { config } from '@gluestack-ui/config'; | ||
import React from 'react'; | ||
import Wrapper from '../../components/Wrapper'; | ||
|
||
export default function SafeAreaViewStory() { | ||
return ( | ||
<Center> | ||
<ScrollView keyboardDismissMode="interactive"> | ||
<Input | ||
style={{ | ||
padding: 16, | ||
marginTop: 50, | ||
}} | ||
inputAccessoryViewID={inputAccessoryViewID} | ||
onChangeText={setText} | ||
value={text} | ||
placeholder={'Please type here…'} | ||
/> | ||
</ScrollView> | ||
<InputAccessoryView nativeID={inputAccessoryViewID}> | ||
<Button onPress={() => setText(initialText)}> | ||
<ButtonText>Clear text </ButtonText> | ||
</Button> | ||
</InputAccessoryView> | ||
</Center> | ||
); | ||
} | ||
|
||
export { | ||
VStack, | ||
Center, | ||
Heading, | ||
GluestackUIProvider, | ||
SafeAreaView, | ||
Text, | ||
} from '@gluestack-ui/themed'; | ||
|
||
export { config, Wrapper }; |
48 changes: 48 additions & 0 deletions
48
...le/storybook/src/ui/react-native-components/InputAcessoryView/index.stories.mdx
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,48 @@ | ||
--- | ||
title: InputAccessoryView | gluestack-ui | ||
|
||
description: A component which enables customization of the keyboard input accessory view on iOS. The input accessory view is displayed above the keyboard whenever a TextInput has focus. This component can be used to create custom toolbars. | ||
--- | ||
|
||
import { Meta } from '@storybook/addon-docs'; | ||
|
||
<Meta title="ui/React Native Components/InputAccessoryView" /> | ||
|
||
# InputAccessoryView | ||
|
||
Following is the default implementation of the **InputAccessoryView** component without any additional customization. This serves as a starting point for users who are new to this library and want to learn about the basic functionality and appearance of the component. | ||
|
||
> Note: InputAccessoryView component is only applicable to iOS devices with iOS version 11 or later. | ||
<iframe | ||
src="https://snack.expo.dev/embedded/@gluestack/inputaccessoryview-gluestack-ui?iframeId=ivy5yisd3p&preview=true&platform=ios&theme=dark" | ||
style={{ width: '100%', height: '60vh', border: '0px' }} | ||
/> | ||
|
||
<br /> | ||
|
||
> Note: You can refer [here](https://github.com/gluestack/gluestack-ui/tree/main/packages/themed/src/components/InputAccessoryView/styled-components) to learn about default styling of InputAccessoryView component | ||
### Import | ||
|
||
To use this component in your project, include the following import statement in your file. | ||
|
||
```bash | ||
import { InputAccessoryView } from '@gluestack-ui/themed'; | ||
``` | ||
### Anatomy | ||
The structure provided below can help you identify and understand a InputAccessoryView component's various parts. | ||
```jsx | ||
export default () => <InputAccessoryView />; | ||
``` | ||
### API Reference | ||
The following section contains a comprehensive list of the component's references, including descriptions, properties, types, and default behavior. This information is readily available for you to access, helping you effectively utilize the component library in your projects. | ||
### InputAccessoryView | ||
It inherits all the properties of React Native's [InputAccessoryView](https://reactnative.dev/docs/InputAccessoryView) component. |
11 changes: 11 additions & 0 deletions
11
example/storybook/src/ui/react-native-components/SafeAreaView/SafeAreaView.stories.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,11 @@ | ||
import type { ComponentMeta } from '@storybook/react-native'; | ||
import SafeAreaViewStory from './SafeAreaView'; | ||
|
||
const SafeAreaViewMeta: ComponentMeta<typeof ScrollView> = { | ||
title: 'stories/React Native Components/SafeAreaView', | ||
component: SafeAreaViewStory, | ||
}; | ||
|
||
export default SafeAreaViewMeta; | ||
|
||
export { SafeAreaView }; |
25 changes: 25 additions & 0 deletions
25
example/storybook/src/ui/react-native-components/SafeAreaView/SafeAreaView.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,25 @@ | ||
import { SafeAreaView, Center, Text } from '@gluestack-ui/themed'; | ||
import { config } from '@gluestack-ui/config'; | ||
import React from 'react'; | ||
import Wrapper from '../../components/Wrapper'; | ||
|
||
export default function SafeAreaViewStory() { | ||
return ( | ||
<Center> | ||
<SafeAreaView flex={1}> | ||
<Text fontSize="$md">Page content</Text> | ||
</SafeAreaView> | ||
</Center> | ||
); | ||
} | ||
|
||
export { | ||
VStack, | ||
Center, | ||
Heading, | ||
GluestackUIProvider, | ||
SafeAreaView, | ||
Text, | ||
} from '@gluestack-ui/themed'; | ||
|
||
export { config, Wrapper }; |
48 changes: 48 additions & 0 deletions
48
example/storybook/src/ui/react-native-components/SafeAreaView/index.stories.mdx
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,48 @@ | ||
--- | ||
title: SafeAreaView | gluestack-ui | ||
|
||
description: Component to ensure that your content is displayed within the safe area of a device screen. The safe area refers to the portion of the screen that is visible and not obstructed by device-specific elements like notches, status bars, and rounded corners. This is particularly important on modern smartphones, where screens may have irregular shapes or include areas that are not fully usable for displaying content. | ||
--- | ||
|
||
import { Meta } from '@storybook/addon-docs'; | ||
|
||
<Meta title="ui/React Native Components/SafeAreaView" /> | ||
|
||
# SafeAreaView | ||
|
||
Following is the default implementation of the **SafeAreaView** component without any additional customization. This serves as a starting point for users who are new to this library and want to learn about the basic functionality and appearance of the component. | ||
|
||
> Note: SafeAreaView component is only applicable to iOS devices with iOS version 11 or later. | ||
<iframe | ||
src="https://snack.expo.dev/embedded/@gluestack/safeareaview-example-gluestack-ui?iframeId=o8ckls5o1n&preview=true&platform=ios&theme=dark" | ||
style={{ width: '100%', height: '60vh', border: '0px' }} | ||
/> | ||
|
||
<br /> | ||
|
||
> Note: You can refer [here](https://github.com/gluestack/gluestack-ui/tree/main/packages/themed/src/components/SafeAreaView/styled-components) to learn about default styling of SafeAreaView component | ||
### Import | ||
|
||
To use this component in your project, include the following import statement in your file. | ||
|
||
```bash | ||
import { SafeAreaView } from '@gluestack-ui/themed'; | ||
``` | ||
### Anatomy | ||
The structure provided below can help you identify and understand a SafeAreaView component's various parts. | ||
```jsx | ||
export default () => <SafeAreaView />; | ||
``` | ||
### API Reference | ||
The following section contains a comprehensive list of the component's references, including descriptions, properties, types, and default behavior. This information is readily available for you to access, helping you effectively utilize the component library in your projects. | ||
### SafeAreaView | ||
It inherits all the properties of React Native's [SafeAreaView](https://reactnative.dev/docs/SafeAreaView) component. |
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,3 @@ | ||
import { createStyle } from '@gluestack-style/react'; | ||
|
||
export const InputAccessoryView = createStyle({}); |
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,3 @@ | ||
import { createStyle } from '@gluestack-style/react'; | ||
|
||
export const SafeAreaView = createStyle({}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "dependencies": {}, "keywords": ["components", "core"] } |
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,3 @@ | ||
import { Root } from './styled-components'; | ||
|
||
export const InputAccessoryView = Root; |
6 changes: 6 additions & 0 deletions
6
packages/themed/src/components/InputAccessoryView/styled-components/Root.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,6 @@ | ||
import { InputAccessoryView } from 'react-native'; | ||
import { styled } from '@gluestack-style/react'; | ||
|
||
export default styled(InputAccessoryView, {}, { | ||
componentName: 'InputAccessoryView', | ||
} as const); |
1 change: 1 addition & 0 deletions
1
packages/themed/src/components/InputAccessoryView/styled-components/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 @@ | ||
export { default as Root } from './Root'; |
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 @@ | ||
{ "dependencies": {}, "keywords": ["components", "core"] } |
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,3 @@ | ||
import { Root } from './styled-components'; | ||
|
||
export const SafeAreaView = Root; |
6 changes: 6 additions & 0 deletions
6
packages/themed/src/components/SafeAreaView/styled-components/Root.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,6 @@ | ||
import { SafeAreaView } from 'react-native'; | ||
import { styled } from '@gluestack-style/react'; | ||
|
||
export default styled(SafeAreaView, {}, { | ||
componentName: 'SafeAreaView', | ||
} as const); |
1 change: 1 addition & 0 deletions
1
packages/themed/src/components/SafeAreaView/styled-components/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 @@ | ||
export { default as Root } from './Root'; |