This library is developed to provide Bottom-Sheets implemented using extended typescript.
Install using npm
npm i @ohos/bottomsheet
- Import files and code dependencies
import { BottomSheet, BottomSheetModel } from '@ohos/bottomsheet'
- Initialize Bottom-Sheet model data
private model: BottomSheetModel = new BottomSheetModel()
- Code for creating Model Bottom-Sheet
this.model
.setBottomSheetBackgroundColor('#F0F3FF')
.setBackgroundScreenColor('#A5A5A5')
.setBackgroundOpacity(0.6)
.setBorderRadius('14vp')
.setBody(this.customDesign)
BottomSheet({
model: this.model,
visible: $visibleDialog1,
body: this.model.getBody()
})
- Code for creating Standard Bottom-Sheet
this.model1
.setBottomSheetBackgroundColor('#F0F3FF')
.setBackgroundScreenColor('#A5A5A5')
.setBackgroundOpacity(0.6)
.setBorderRadius('14vp')
.setBody(this.customDesign1)
BottomSheet({
model: this.model1,
visible: $visibleDialog2,
body: this.model.getBody()
})
Supports OpenHarmony API version 9
If you find any problems during usage, you can submit an Issue to us. Of course, we also welcome you to send us PR.
Licensed under Apache-2.0 license.
Design by : Nishant Trivedi