dimanche 28 novembre 2021

React native nativebase checkbox: Text inside a checkbox going out of the screen

I cant make it work, text inside a checkbox (nativebase) is not shrinking, does anyone knows why? Am i missing some flex properties?

import React from "react"
import {Box, Center, Checkbox, Heading, NativeBaseProvider, Text} from "native-base"

export const List = () => {
    return (
        <Box mb="10%" mt="30%" width="80%" height="80%" maxHeight="80%">
            <Checkbox value={"superlongipermegatest"}>
                <Text mx="2">
                    superlongipermegatest
                </Text>
            </Checkbox>
        </Box>
    )
}

export default () => {
    return (
        <NativeBaseProvider>
            <Center
                flex={1}
                px="1">
                <List/>
            </Center>
        </NativeBaseProvider>
    )
}




Aucun commentaire:

Enregistrer un commentaire