React Native / Feedback
EmptyState
Placeholder for an empty list or a search with no results. The title is a heading.
import { EmptyState } from "@stylhero/native";
Example
import { Button, EmptyState } from "@stylhero/native";
const noop = () => {};
function EmptyStateExample() {
return (
<EmptyState
title="No saved builds yet"
description="Builds you save show up here, with their prices kept up to date."
action={<Button onPress={noop}>Start a build</Button>}
/>
);
}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title required |
string |
- | |
action |
ReactNode |
- | What to do next, e.g. a Button "Create your first build". |
description |
string |
- | |
icon |
ReactNode |
- | Illustration or large icon. Decorative: hidden from screen readers. |
style |
StyleProp<ViewStyle> |
- | |
testID |
string |
- |
Accessibility
- The title is a header. The icon is hidden from screen readers.
Generated from src/components/EmptyState.tsx. Something wrong or missing? Open an issue.