Create EmptyState component
This commit is contained in:
19
webui/src/common/components/EmptyState/EmptyState.jsx
Normal file
19
webui/src/common/components/EmptyState/EmptyState.jsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
import './styles.sass';
|
||||
|
||||
export const EmptyState = ({
|
||||
icon,
|
||||
title,
|
||||
description,
|
||||
action,
|
||||
className = ''
|
||||
}) => {
|
||||
return (
|
||||
<div className={`empty-state ${className}`}>
|
||||
{icon && <div className="empty-state-icon">{icon}</div>}
|
||||
{title && <h3 className="empty-state-title">{title}</h3>}
|
||||
{description && <p className="empty-state-description">{description}</p>}
|
||||
{action && <div className="empty-state-action">{action}</div>}
|
||||
</div>
|
||||
);
|
||||
};
|
1
webui/src/common/components/EmptyState/index.js
Normal file
1
webui/src/common/components/EmptyState/index.js
Normal file
@@ -0,0 +1 @@
|
||||
export { EmptyState as default } from './EmptyState.jsx';
|
32
webui/src/common/components/EmptyState/styles.sass
Normal file
32
webui/src/common/components/EmptyState/styles.sass
Normal file
@@ -0,0 +1,32 @@
|
||||
.empty-state
|
||||
text-align: center
|
||||
padding: 3rem 2rem
|
||||
color: var(--text-dim)
|
||||
display: flex
|
||||
flex-direction: column
|
||||
align-items: center
|
||||
gap: 1rem
|
||||
|
||||
.empty-state-icon
|
||||
color: var(--text-dim)
|
||||
display: flex
|
||||
justify-content: center
|
||||
|
||||
svg
|
||||
width: 48px
|
||||
height: 48px
|
||||
|
||||
.empty-state-title
|
||||
font-size: 1.2rem
|
||||
font-weight: 600
|
||||
color: var(--text)
|
||||
margin: 0
|
||||
|
||||
.empty-state-description
|
||||
font-size: 0.95rem
|
||||
margin: 0
|
||||
max-width: 400px
|
||||
line-height: 1.5
|
||||
|
||||
.empty-state-action
|
||||
margin-top: 0.5rem
|
Reference in New Issue
Block a user