COmpoeentes standardization 2
This commit is contained in:
@@ -3,7 +3,9 @@ import Switch from '../form/switch/Switch';
|
||||
import Button from '../ui/button/Button';
|
||||
import Badge from '../ui/badge/Badge';
|
||||
import SiteSetupChecklist from '../sites/SiteSetupChecklist';
|
||||
import SiteTypeBadge from '../sites/SiteTypeBadge';
|
||||
import { Site } from '../../services/api';
|
||||
import { BoxCubeIcon as SettingsIcon, EyeIcon, FileIcon } from '../../icons';
|
||||
|
||||
interface SiteCardProps {
|
||||
site: Site;
|
||||
@@ -68,16 +70,17 @@ export default function SiteCard({
|
||||
</p>
|
||||
)}
|
||||
<div className="flex items-center gap-2 mb-2 flex-wrap">
|
||||
<SiteTypeBadge hostingType={site.hosting_type} />
|
||||
{site.industry_name && (
|
||||
<Badge variant="light" color="info" className="text-xs">
|
||||
<Badge variant="soft" color="warning" size="sm">
|
||||
{site.industry_name}
|
||||
</Badge>
|
||||
)}
|
||||
<Badge variant="light" color="info" className="text-xs">
|
||||
<Badge variant="soft" color="neutral" size="sm">
|
||||
{site.active_sectors_count} / 5 Sectors
|
||||
</Badge>
|
||||
{site.status && (
|
||||
<Badge variant="light" color={site.status === 'active' ? 'success' : 'dark'} className="text-xs">
|
||||
<Badge variant={site.is_active ? 'solid' : 'soft'} color={site.status === 'active' ? 'success' : 'neutral'} size="sm">
|
||||
{site.status}
|
||||
</Badge>
|
||||
)}
|
||||
@@ -105,46 +108,34 @@ export default function SiteCard({
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center justify-between border-t border-gray-200 p-5 dark:border-gray-800">
|
||||
<div className="flex gap-3">
|
||||
<div className="flex items-center justify-between border-t border-gray-200 p-4 dark:border-gray-800">
|
||||
<div className="flex gap-2 flex-1">
|
||||
<Button
|
||||
variant="outline"
|
||||
size="md"
|
||||
onClick={() => onSettings(site)}
|
||||
title="Configure Site - Update connection details and publishing settings"
|
||||
className="shadow-theme-xs inline-flex h-11 w-11 items-center justify-center rounded-lg border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-400"
|
||||
variant="primary"
|
||||
tone="brand"
|
||||
size="sm"
|
||||
onClick={() => onDetails(site)}
|
||||
startIcon={<EyeIcon className="w-4 h-4" />}
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M5.64615 4.59906C5.05459 4.25752 4.29808 4.46015 3.95654 5.05171L2.69321 7.23986C2.35175 7.83128 2.5544 8.58754 3.14582 8.92899C3.97016 9.40493 3.97017 10.5948 3.14583 11.0707C2.55441 11.4122 2.35178 12.1684 2.69323 12.7598L3.95657 14.948C4.2981 15.5395 5.05461 15.7422 5.64617 15.4006C6.4706 14.9247 7.50129 15.5196 7.50129 16.4715C7.50129 17.1545 8.05496 17.7082 8.73794 17.7082H11.2649C11.9478 17.7082 12.5013 17.1545 12.5013 16.4717C12.5013 15.5201 13.5315 14.9251 14.3556 15.401C14.9469 15.7423 15.7029 15.5397 16.0443 14.9485L17.3079 12.7598C17.6494 12.1684 17.4467 11.4121 16.8553 11.0707C16.031 10.5948 16.031 9.40494 16.8554 8.92902C17.4468 8.58757 17.6494 7.83133 17.3079 7.23992L16.0443 5.05123C15.7029 4.45996 14.9469 4.25737 14.3556 4.59874C13.5315 5.07456 12.5013 4.47961 12.5013 3.52798C12.5013 2.84515 11.9477 2.2915 11.2649 2.2915L8.73795 2.2915C8.05496 2.2915 7.50129 2.84518 7.50129 3.52816C7.50129 4.48015 6.47059 5.07505 5.64615 4.59906Z"
|
||||
stroke="currentColor"
|
||||
strokeWidth="1.5"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
<path
|
||||
d="M12.5714 9.99977C12.5714 11.4196 11.4204 12.5706 10.0005 12.5706C8.58069 12.5706 7.42969 11.4196 7.42969 9.99977C7.42969 8.57994 8.58069 7.42894 10.0005 7.42894C11.4204 7.42894 12.5714 8.57994 12.5714 9.99977Z"
|
||||
stroke="currentColor"
|
||||
strokeWidth="1.5"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
Dashboard
|
||||
</Button>
|
||||
<Button
|
||||
variant="secondary"
|
||||
tone="neutral"
|
||||
size="sm"
|
||||
onClick={() => onDetails(site)}
|
||||
startIcon={<FileIcon className="w-4 h-4" />}
|
||||
>
|
||||
Content
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="md"
|
||||
onClick={() => onDetails(site)}
|
||||
title="View Site Details - See all information about this website"
|
||||
className="shadow-theme-xs inline-flex h-11 items-center justify-center rounded-lg border border-gray-300 px-4 py-3 text-sm font-medium text-gray-700 dark:border-gray-700 dark:text-gray-400"
|
||||
tone="neutral"
|
||||
size="sm"
|
||||
onClick={() => onSettings(site)}
|
||||
startIcon={<SettingsIcon className="w-4 h-4" />}
|
||||
>
|
||||
View Details
|
||||
Settings
|
||||
</Button>
|
||||
</div>
|
||||
<Switch
|
||||
|
||||
Reference in New Issue
Block a user