Skip to content

Commit

Permalink
cleanup(DataBlock): remove unused stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
BrickheadJohnny committed Nov 28, 2024
1 parent 2c5717f commit dcbf40c
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions src/components/requirements/DataBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,9 @@
import { Skeleton } from "@/components/ui/Skeleton";
import { Warning } from "@phosphor-icons/react/dist/ssr";
import type { PropsWithChildren } from "react";

type Props = {
isLoading?: boolean;
error?: string;
};

export const DataBlock = ({
isLoading,
error,
children,
}: PropsWithChildren<Props>): JSX.Element => {
if (isLoading) return <Skeleton className="inline w-24" />;

export const DataBlock = ({ children }: PropsWithChildren): JSX.Element => {
return (
<span className="break-words rounded-md bg-blackAlpha px-1.5 py-0.5 text-sm dark:bg-blackAlpha-hard">
{error && (
<Warning
weight="bold"
className="-top-px relative mr-1.5 inline-flex text-icon-warning"
/>
)}
<span className="font-mono">{children}</span>
<span className="break-words rounded-md bg-blackAlpha px-1.5 py-0.5 font-mono text-sm dark:bg-blackAlpha-hard">
{children}
</span>
);
};

0 comments on commit dcbf40c

Please sign in to comment.