Message
Display global messages as feedback in response to user operations.
import { Message } from '@redshank/native';
When To Use
- To provide feedback such as success, warning, error etc.
- A message is displayed at top and center and will be dismissed automatically, as a non-interrupting light-weighted prompt.
Examples
Message
Default Message element.
With Icon
With icon message element.
With Shadow Box
With shadow box message element.
With Shadow Opacity
With shadow opacity message element.
Message
Options Api props
Attribute | Type | Accepted values | Description | Default |
---|---|---|---|---|
Component | Component FunctionComponent | JSX.Element Component | Change component Message | View if onPress then Ripple |
content | string | Text | Content message | - |
iconLeft | ReactNode | Component | Icon left | if showIcon is true then closecircle of antdesign |
iconRight | ReactNode | Component | Icon right | - |
onPress | function | (event) => void | Optional function when trigger press message | - |
style | object | StyleProp<ViewStyle> | Style for component | - |
styleText | object | StyleProp<ViewStyle> | Style for text content | - |
type | MessageType | defautl shadow | Background opacity or solid color | default |
withBoxShadow | boolean | true false | Show shadown outsite message | false |
withIcon | boolean | true false | Show or hidden icon | false |
Community:
We're excited to see the community adopt @redshank/native, raise issues, and provide feedback. Whether it's a feature request, bug report, or a project to showcase, please get involved!
DiscordGithubContributing:
PR's on @redshank/native are always welcome, please see our contribution guidelines to learn how you can contribute to this project.