GeekyAnts / NativeBase

Mobile-first, accessible components for React Native & Web to build consistent UI across Android, iOS and Web.
https://nativebase.io/
MIT License
20.23k stars 2.39k forks source link

CheckBox text overflowing. #5748

Open uzun0ff opened 1 year ago

uzun0ff commented 1 year ago

Description

I expected that the text would behave the same way when the checkbox is checked and unchecked

NativeBase Version

3.4.19

Platform

Other Platform

No response

Additional Information

I am trying to figure out why the text in a checkbox appears to behave differently depending on when it is checked or unchecked. I've also attempted to style it with the _text property but to no avail.

Code:

  <Box {...props}>
      <Checkbox
        _checked={{ borderColor: 'opal', borderRadius: 'full', w: '12', h: '12' }}
        _icon={{ size: '6' }}
        _stack={{
          bg: action?.isChecked ? 'rgba(0, 0, 0, 0.02)' : 'rgba(0, 0, 0, 0.06)',
          p: '2',
          width: 'full',
          borderRadius: 'full',
        }}
        borderRadius="full"
        colorScheme="white"
        icon={<Icon as={<IconChecked color="cobalt" />} />}
        isChecked={!!action.isChecked}
        mb="2"
        minH="12"
        value={action.sk}
        w="12"
        onChange={() => setAction(!action?.isChecked)}
      >
        <Text flex="1" flexWrap="wrap" textDecorationLine={action?.isChecked ? 'line-through' : null} w="100%">
          {action.title}
        </Text>
      </Checkbox>
    </Box>

Result:

Screenshot 2023-05-16 at 11 47 29 Screenshot 2023-05-16 at 11 47 23
alexu96 commented 9 months ago

Hello @uzun0ff , please provide steps to reproduce this issue with a screenshot / screen recording .