Alert

The Alert component is used to convey important information to the user through the use of contextual types, icon and colors.

Usage

import {Alert, Text} from '@smartacteam/react-native-ui';
<Alert mt_10 variant='destructive' leftIcon='video'>
  <Text size_md>
    Alert Title
  </Text>
  <Text size_xs text_base_muted_foreground>
    Insert any additional information about the alert
  </Text>
</Alert>

Example

Preview

Props

NameTypeRequiredDescription
childrenReact.ReactNodeNoContent rendered inside the alert.
onPress() => voidNoAlert action (if needed).
leftIconIconNameNoThe icon prop must be one of icons
variant'primary' | 'secondary' | 'confirmation' | 'warning' | 'destructive'NoVisual style of the alert.
(…)(Inherited)Props from BaseSmacStyling, TouchableOpacityProps.

See BaseSmacStyling and React Native TouchableOpacity Props for inherited options.