-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup(DataBlock): remove unused stuff
- Loading branch information
1 parent
2c5717f
commit dcbf40c
Showing
1 changed file
with
3 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
}; |