Created
September 21, 2018 06:42
-
-
Save zi6xuan/e7eb275ff88934b882376ecaa982972f to your computer and use it in GitHub Desktop.
一个悬浮在手机顶端的信息提示框
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
import { Theme, Overlay } from 'teaset'; | |
export function BBox(msg: strings) { | |
let overlayView = ( | |
<Overlay.PullView | |
containerStyle={{ alignItems: 'stretch', justifyContent: 'flex-start', backgroundColor: '#00000000', }} | |
side='top' | |
overlayOpacity={0}> | |
<View style={{ justifyContent: 'center', backgroundColor: '#000000D1', height: 120, paddingTop: Theme.statusBarHeight }}> | |
<Text style={{ fontSize: 15, margin: 5, color: 'white' }}>{msg}</Text> | |
</View> | |
</Overlay.PullView> | |
); | |
let bbox = Overlay.show(overlayView); | |
setTimeout(() => { | |
Overlay.hide(bbox); | |
}, 5000); | |
return bbox; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment