import React, { useState } from 'react' import { useTranslate } from '../utils'; import Cell from '../cell' import Popup from '.' import { DemoPage, DemoCard } from '../configprovider/styles/demo.page' import { View, Text } from 'react-native'; interface T { ce5c5446: string c38a08ef: string b840c88f: string a74a1fd4: string '8dab2f66': string cfbdc781: string c3a3a1d2: string e51e4582: string '7db1a8b2': string a52bef0c: string d04fcbda: string '0aaad620': string } const PopupDemo = () => { const [translated] = useTranslate({ 'zh-CN': { ce5c5446: '基础类型', c38a08ef: '展示弹出层', b840c88f: '正文', a74a1fd4: '弹出位置', '8dab2f66': '顶部弹出', cfbdc781: '底部弹出', c3a3a1d2: '左侧弹出', e51e4582: '右侧弹出', '7db1a8b2': '关闭图标', a52bef0c: '图标位置', d04fcbda: '自定义图标', '0aaad620': '圆角弹框' }, 'zh-TW': { ce5c5446: '基礎類型', c38a08ef: '展示彈出層', b840c88f: '正文', a74a1fd4: '彈出位置', '8dab2f66': '頂部彈出', cfbdc781: '底部彈出', c3a3a1d2: '左側彈出', e51e4582: '右側彈出', '7db1a8b2': '關閉圖標', a52bef0c: '圖標位置', d04fcbda: '自定義圖標', '0aaad620': '圓角彈框' }, 'en-US': { ce5c5446: 'base type', c38a08ef: 'Show popup', b840c88f: 'text', a74a1fd4: 'popup location', '8dab2f66': 'top pop', cfbdc781: 'bottom pop', c3a3a1d2: 'pop up left', e51e4582: 'pop up right', '7db1a8b2': 'close icon', a52bef0c: 'Icon position', d04fcbda: 'custom icon', '0aaad620': 'Rounded popup' }, }) const [showBasic, setShowBasic] = useState(false) const [showTop, setShowTop] = useState(false) const [showBottom, setShowBottom] = useState(false) const [showLeft, setShowLeft] = useState(false) const [showRight, setShowRight] = useState(false) const [showIcon, setShowIcon] = useState(false) const [showIconPosition, setShowIconPosition] = useState(false) const [showIconDefine, setShowIconDefine] = useState(false) const [showBottomRound, setShowBottomRound] = useState(false) const [showMountNode, setShowMountNode] = useState(false) const [showMutiple, setShowMutiple] = useState(false) const [showMutipleInner, setShowMutipleInner] = useState(false) return ( { setShowBasic(true) }} /> { setShowBasic(false) }} onClickOverlay={ () => { setShowBasic(false) } } > {translated.b840c88f} { setShowTop(true) }} /> { setShowBottom(true) }} /> { setShowLeft(true) }} /> { setShowRight(true) }} /> { setShowTop(false) }} onClickOverlay={ () => { setShowTop(false) } } /> { setShowBottom(false) }} onClickOverlay={ () => { setShowBottom(false) } } /> { setShowLeft(false) }} onClickOverlay={ () => { setShowLeft(false) } } /> { setShowRight(false) }} onClickOverlay={ () => { setShowRight(false) } } /> { setShowIcon(true) }} /> { setShowIconPosition(true) }} /> { setShowIconDefine(true) }} /> { setShowIcon(false) }} onClickOverlay={ () => { setShowIcon(false) } } onClickCloseIcon={() => { setShowIcon(false) } } /> { setShowIconPosition(false) }} onClickOverlay={ () => { setShowIconPosition(false) } } onClickCloseIcon={() => { setShowIconPosition(false) } } /> { setShowIconDefine(false) }} onClickOverlay={ () => { setShowIconDefine(false) } } onClickCloseIcon={() => { setShowIconDefine(false) } } /> { setShowBottomRound(true) }} /> { setShowBottomRound(false) }} onClickOverlay={ () => { setShowBottomRound(false) } } onClickCloseIcon={() => { setShowBottomRound(false) } } /> ) } export default PopupDemo