React Native MantineButtons

CloseButton

Universal close button

Import: import { CloseButton } from 'react-native-mantine';

Usage

import { CloseButton } from 'react-native-mantine';

<CloseButton
  onPress={() => console.log('Close pressed')}
  size="lg"
  radius="md"
/>

// With custom icon color
<CloseButton
  iconColor="#fa5252"
  size="md"
  onPress={handleClose}
/>

Props

PropTypeDefaultDescription
onPress() => voidCalled when button is pressed
size'xs' | 'sm' | 'md' | 'lg' | 'xl' | number"md"Button size - theme size or number in pixels
radius'xs' | 'sm' | 'md' | 'lg' | 'xl'"sm"Key of theme.radius to set border-radius
iconColorstringIcon color - any valid color string
iconReact.ReactNodeCustom icon to replace default close icon
accessibilityLabelstring"Close"Accessibility label for screen readers
disabledbooleanfalseDisabled state - prevents interaction and reduces opacity
styleViewStyleAdditional styles to apply to the button container

Source on GitHub · npm