Skip to content

Latest commit

 

History

History
 
 

interactive

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Interaction example

The app that rendered checkbox and handles the onSelectionEnter, onSelectionLeave events.

Demo:

Code example:

const [checked, setChecked] = React.useState(false);
...
<Frame style={styles.frame}>                                                                   
    <Checkbox                                                                                  
        checked={checked}                                                                      
        label="select me"                                                                      
        onSelectionEnter={() => setChecked(true)}                                              
        onSelectionLeave={() => setChecked(false)}                                             
    />                                                                                         
    <Text style={styles.text}>{checked ? 'Checkbox selected' : 'Checkbox not selected'}</Text> 
    <Text style={styles.text}>{`Counter: ${counter}`}</Text>                                   
</Frame>                                                                                         

How to run