Open bekroz opened 2 years ago
How can I change value to false when overlay is pressed?
This is my environment:
System: OS: macOS 12.6 CPU: (8) arm64 Apple M1 Memory: 125.53 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.10.0 - /opt/homebrew/bin/node Yarn: 1.22.19 - ~/WORK/givento/node_modules/.bin/yarn npm: 8.19.2 - /opt/homebrew/bin/npm Watchman: 2022.10.03.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9014738 Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild Languages: Java: 18.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: ^18.2.0 => 18.2.0 react-native: 0.68.2 => 0.68.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
This is how my code looks like:
=>>>>>>>>>>>>>>>>>
This is how I imported it.
import { FloatingAction } from 'react-native-floating-action'
Main.ts
import { useState } from 'react' import { DATA } from '~/data' import { Libs } from '~/libs' import { Custom } from '~/components'
const EventsAddBtn = ({ visible }) => { const [isOpen, setIsOpen] = useState(false) const onPress = () => { console.log('close') setIsOpen(!isOpen) } console.log('is', isOpen)
return ( <Custom.View bg={'red'} flex={1}> <Libs.UI.FloatingAction overlayColor={'rgba(16, 16, 50, 0.5)'} showBackground={true} animated={true} visible={visible} actions={DATA.events.floatBtnMenu} onPressBackdrop={() => console.log('close me')} onPressItem={name => { console.log(selected button: ${name}) }} /> </Custom.View> ) }
selected button: ${name}
export default EventsAddBtn
How can I change value to false when overlay is pressed?
This is my environment:
System: OS: macOS 12.6 CPU: (8) arm64 Apple M1 Memory: 125.53 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.10.0 - /opt/homebrew/bin/node Yarn: 1.22.19 - ~/WORK/givento/node_modules/.bin/yarn npm: 8.19.2 - /opt/homebrew/bin/npm Watchman: 2022.10.03.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9014738 Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild Languages: Java: 18.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: ^18.2.0 => 18.2.0 react-native: 0.68.2 => 0.68.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
This is how my code looks like:
=>>>>>>>>>>>>>>>>>
This is how I imported it.
import { FloatingAction } from 'react-native-floating-action'
Main.ts
import { useState } from 'react' import { DATA } from '~/data' import { Libs } from '~/libs' import { Custom } from '~/components'
const EventsAddBtn = ({ visible }) => { const [isOpen, setIsOpen] = useState(false) const onPress = () => { console.log('close') setIsOpen(!isOpen) } console.log('is', isOpen)
return ( <Custom.View bg={'red'} flex={1}> <Libs.UI.FloatingAction overlayColor={'rgba(16, 16, 50, 0.5)'} showBackground={true} animated={true} visible={visible} actions={DATA.events.floatBtnMenu} onPressBackdrop={() => console.log('close me')} onPressItem={name => { console.log(
selected button: ${name}
) }} /> </Custom.View> ) }export default EventsAddBtn
=>>>>>>>>>>>>>>>>>