Styled loading and summary view
This commit is contained in:
@@ -12,7 +12,7 @@ export const Loading: FC<PropsWithChildren> = ({ children }) => {
|
||||
return (
|
||||
<div
|
||||
className={twMerge(
|
||||
"text-center p-2 text-xl text-slate-400 opacity-0 transition-opacity",
|
||||
"font-mono text-center p-2 text-sm text-polkadot-600 opacity-0 transition-opacity h-48 flex items-center justify-center",
|
||||
visible && "opacity-100",
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -101,7 +101,7 @@ export const BlockTable = () => {
|
||||
if (!finalized) return null
|
||||
|
||||
return (
|
||||
<div className="w-full p-2 border border-polkadot-800 rounded">
|
||||
<div className="w-full px-3 py-2 border border-polkadot-700">
|
||||
<h2 className="font-bold p-2 border-b border-slate-400 mb-2">
|
||||
Recent Blocks
|
||||
</h2>
|
||||
|
||||
@@ -35,7 +35,7 @@ export const Events = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="w-full p-2 border border-polkadot-800 rounded">
|
||||
<div className="w-full px-3 py-2 border border-polkadot-700">
|
||||
<h2 className="font-bold p-2 border-b border-slate-400 mb-2">
|
||||
Recent Events
|
||||
</h2>
|
||||
|
||||
@@ -15,18 +15,20 @@ const best$ = chainHead$.pipeState(
|
||||
|
||||
export const Summary: FC = () => {
|
||||
return (
|
||||
<div className="flex gap-2 items-center p-2">
|
||||
<SummaryItem title="Block Time">
|
||||
<div className="flex gap-4 items-center py-2">
|
||||
<SummaryItem
|
||||
title="Block Time"
|
||||
className="bg-opacity-0"
|
||||
>
|
||||
<BlockTime />
|
||||
</SummaryItem>
|
||||
<div className="flex-1" />
|
||||
<SummaryItem
|
||||
className="border border-slate-500 rounded p-2"
|
||||
title="Finalized"
|
||||
>
|
||||
{finalized$}
|
||||
</SummaryItem>
|
||||
<SummaryItem className="border border-slate-500 rounded p-2" title="Best">
|
||||
<SummaryItem title="Best">
|
||||
{best$}
|
||||
</SummaryItem>
|
||||
</div>
|
||||
@@ -37,9 +39,9 @@ const SummaryItem: FC<
|
||||
PropsWithChildren<{ title: string; className?: string }>
|
||||
> = ({ title, className, children }) => {
|
||||
return (
|
||||
<div className={twMerge("flex flex-col items-center", className)}>
|
||||
<div className={twMerge("flex flex-col items-center bg-polkadot-800 px-3 py-2", className)}>
|
||||
<h3>{title}</h3>
|
||||
<div className="tabular-nums text-polkadot-200 text-sm">{children}</div>
|
||||
<div className="tabular-nums text-slate-300 text-sm">{children}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export const EditMode: React.FC<{
|
||||
>
|
||||
<div
|
||||
ref={treeRef}
|
||||
className="w-96 sticky top-0 pl-2 pb-16 leading-loose overflow-hidden max-sm:hidden text-sm"
|
||||
className="min-w-fit w-96 sticky top-0 pl-2 pb-16 leading-loose overflow-hidden max-sm:hidden text-sm"
|
||||
>
|
||||
<div className="relative">
|
||||
{!value.value ? (
|
||||
|
||||
Reference in New Issue
Block a user