Files
community-rule/app/components/cards/NoRules/NoRules.view.tsx
T

53 lines
1.4 KiB
TypeScript

"use client";
import { memo } from "react";
import Button from "../../buttons/Button";
import NavigationLink from "../../navigation/Link";
import type { NoRulesViewProps } from "./NoRules.types";
export const NoRulesView = memo(function NoRulesView({
title,
description,
createLabel,
browseLabel,
onCreate,
browseHref,
className = "",
}: NoRulesViewProps) {
return (
<div
className={`flex w-full flex-col items-start gap-4 rounded-[var(--radius-300)] border border-dashed border-[var(--color-border-default-secondary)] p-8 ${className}`.trim()}
data-figma-node="25032:50447"
>
<h3 className="w-full font-bricolage-grotesque text-small-heading text-[var(--color-content-default-primary)]">
{title}
</h3>
<p className="w-full text-medium-paragraph text-[var(--color-content-default-secondary)]">
{description}
</p>
<div className="flex w-full flex-wrap items-center gap-x-4 gap-y-3 pt-2">
<Button
type="button"
size="large"
buttonType="filled"
palette="default"
onClick={onCreate}
>
{createLabel}
</Button>
<NavigationLink
href={browseHref}
type="primary"
theme="dark"
leadingIcon={false}
trailingIcon={false}
>
{browseLabel}
</NavigationLink>
</div>
</div>
);
});
NoRulesView.displayName = "NoRulesView";