({
message,
onNew
}: EmptyViewProps)
| 211 | }; |
| 212 | |
| 213 | export 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 | |
| 243 | interface EntityListProps<T> { |
| 244 | items: T[]; |
nothing calls this directly
no outgoing calls
no test coverage detected