MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / EmptyView

Function EmptyView

src/components/entity-components.tsx:213–241  ·  view source on GitHub ↗
({
  message,
  onNew
}: EmptyViewProps)

Source from the content-addressed store, hash-verified

211};
212
213export const EmptyView = ({
214 message,
215 onNew
216}: EmptyViewProps) => {
217 return (
218 <Empty className="border border-dashed bg-white">
219 <EmptyHeader>
220 <EmptyMedia variant="icon">
221 <PackageOpenIcon />
222 </EmptyMedia>
223 </EmptyHeader>
224 <EmptyTitle>
225 No items
226 </EmptyTitle>
227 {!!message && (
228 <EmptyDescription>
229 {message}
230 </EmptyDescription>
231 )}
232 {!!onNew && (
233 <EmptyContent>
234 <Button onClick={onNew}>
235 Add item
236 </Button>
237 </EmptyContent>
238 )}
239 </Empty>
240 );
241};
242
243interface EntityListProps<T> {
244 items: T[];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected