-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Feature Description
- Examples that update in real time.
- Examples that allow you to have buttons like in the image and execute functions in js, inside there could be an http call that activates a service.
- Examples that take data from http api, to show the updated real-time result.
- Have an example that allows you to click on a refresh image, it allows you to update the component.
import { VoltraAndroid } from 'voltra'
import { useState } from 'react'
export const TimeWidget = () => {
const [time, setTime] = useState<string>(
new Date().toLocaleTimeString()
)
const refresh = () => {
setTime(new Date().toLocaleTimeString())
}
return (
<VoltraAndroid.Column
style={{
backgroundColor: '#FFFFFF',
width: '100%',
height: '100%',
padding: 16,
}}
horizontalAlignment="center-horizontally"
verticalAlignment="center-vertically"
>
<VoltraAndroid.Text>{time}</VoltraAndroid.Text>
<VoltraAndroid.Image
source={{ assetName: 'refresh' }}
style={{ width: 100, height: 100, borderRadius: 8, marginTop: 16 }}
onClick={refresh}
/>
</VoltraAndroid.Column>
)
}Problem Statement
Having more examples would help us fully understand how to use this library.
Proposed Solution
No response
Alternatives Considered
No response
Current Library Version
1.1.2
Implementation
- I would be willing to submit a pull request for this feature
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request