From 045a73d35b45988a53129f8748adda8d3f8acb4f Mon Sep 17 00:00:00 2001 From: adids1221 Date: Thu, 19 Dec 2024 15:52:26 +0200 Subject: [PATCH 1/9] Initial Commit --- demo/src/screens/PlaygroundScreen.tsx | 61 +++++- src/components/actionSheet/index.tsx | 1 + .../ActionSheet/actionSheet.api.json | 0 src/incubator/ActionSheet/index.tsx | 188 ++++++++++++++++++ src/incubator/ActionSheet/types.ts | 111 +++++++++++ src/incubator/index.ts | 22 +- 6 files changed, 371 insertions(+), 12 deletions(-) create mode 100644 src/incubator/ActionSheet/actionSheet.api.json create mode 100644 src/incubator/ActionSheet/index.tsx create mode 100644 src/incubator/ActionSheet/types.ts diff --git a/demo/src/screens/PlaygroundScreen.tsx b/demo/src/screens/PlaygroundScreen.tsx index 0bda100e67..89d3953aa4 100644 --- a/demo/src/screens/PlaygroundScreen.tsx +++ b/demo/src/screens/PlaygroundScreen.tsx @@ -1,19 +1,60 @@ import React, {Component} from 'react'; -import {View, Text, Card, TextField, Button} from 'react-native-ui-lib'; +import {View, Button, Incubator} from 'react-native-ui-lib'; export default class PlaygroundScreen extends Component { + state = { + visible: false, + selectedOption: undefined + }; + + pickOption(index: string) { + console.log(`picked option ${index}`); + } + + OPTIONS = [ + {label: 'option 1', onPress: () => this.pickOption('option 1')}, + {label: 'option 2', onPress: () => this.pickOption('option 2')}, + {label: 'option 3', onPress: () => this.pickOption('option 3')}, + {label: 'option 1', onPress: () => this.pickOption('option 1')}, + {label: 'option 2', onPress: () => this.pickOption('option 2')}, + {label: 'option 3', onPress: () => this.pickOption('option 3')}, + {label: 'option 1', onPress: () => this.pickOption('option 1')}, + {label: 'option 2', onPress: () => this.pickOption('option 2')}, + {label: 'option 3', onPress: () => this.pickOption('option 3')}, + {label: 'option 1', onPress: () => this.pickOption('option 1')}, + {label: 'option 2', onPress: () => this.pickOption('option 2')}, + {label: 'option 3', onPress: () => this.pickOption('option 3')}, + {label: 'option 1', onPress: () => this.pickOption('option 1')}, + {label: 'option 2', onPress: () => this.pickOption('option 2')}, + {label: 'option 3', onPress: () => this.pickOption('option 3')}, + {label: 'cancel', onPress: () => this.pickOption('cancel')} + ]; + render() { return ( - - - - - Playground Screen - - -