Component View mapping lvgl Base object (lv_obj)
- style
- onPressedStyle
- scrollbarStyle
- onScrollbarPressedStyle
- onScrollbarScrollingStyle
- onClick
- onPressed
- onLongPressed
- onLongPressRepeat
- align
- alignTo
import { View, EAlignType, Button, Text } from 'lvlgjs-ui'
import { useRef, useEffect } from 'react'
function Component () {
const ref = useRef()
useEffect(() => {
console.log(ref.current.style.left)
})
return (
<View
style={style.view}
onPressedStyle={style.viewPressed}
onClick={e => { e.stopPropagation() }}
onPressed={() => {}}
onLongPressed={() => {}}
onLongPressRepeat={() => {}}
align={{
type: EAlignType.ALIGN_CENTER,
pos: [10, 0]
}}
ref={ref}
>
<Button>
<Text>2222</Text>
</Button>
</View>
)
}
const style = {
view: {},
viewPressed: {}
}