Skip to content

Commit 94e62df

Browse files
committed
Dashboard: Migrate Explorer components from chakra to tailwind
1 parent 921a95e commit 94e62df

File tree

9 files changed

+394
-523
lines changed

9 files changed

+394
-523
lines changed

apps/dashboard/src/@/components/blocks/FormFieldSetup.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { AsteriskIcon, InfoIcon } from "lucide-react";
22
import type React from "react";
33
import { Label } from "@/components/ui/label";
44
import { ToolTipLabel } from "@/components/ui/tooltip";
5+
import { cn } from "../../lib/utils";
56

67
export function FormFieldSetup(props: {
78
htmlFor?: string;
@@ -10,13 +11,22 @@ export function FormFieldSetup(props: {
1011
children: React.ReactNode;
1112
tooltip?: React.ReactNode;
1213
isRequired: boolean;
14+
labelClassName?: string;
15+
labelContainerClassName?: string;
1316
helperText?: React.ReactNode;
1417
className?: string;
1518
}) {
1619
return (
1720
<div className={props.className}>
18-
<div className="mb-2 inline-flex items-center gap-1">
19-
<Label htmlFor={props.htmlFor}>{props.label}</Label>
21+
<div
22+
className={cn(
23+
"mb-2 inline-flex items-center gap-1",
24+
props.labelContainerClassName,
25+
)}
26+
>
27+
<Label htmlFor={props.htmlFor} className={props.labelClassName}>
28+
{props.label}
29+
</Label>
2030

2131
{props.isRequired && (
2232
<AsteriskIcon className="size-3.5 text-destructive-text" />

apps/dashboard/src/@/components/blocks/code/code-segment.client.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type React from "react";
33
import { type Dispatch, type SetStateAction, useMemo } from "react";
44
import { CodeClient } from "@/components/ui/code/code.client";
55
import { TabButtons } from "@/components/ui/tabs";
6+
import { cn } from "@/lib/utils";
67

78
export type CodeEnvironment =
89
| "javascript"
@@ -50,6 +51,7 @@ interface CodeSegmentProps {
5051
isInstallCommand?: boolean;
5152
hideTabs?: boolean;
5253
onlyTabs?: boolean;
54+
codeContainerClassName?: string;
5355
}
5456

5557
export const CodeSegment: React.FC<CodeSegmentProps> = ({
@@ -59,6 +61,7 @@ export const CodeSegment: React.FC<CodeSegmentProps> = ({
5961
isInstallCommand,
6062
hideTabs,
6163
onlyTabs,
64+
codeContainerClassName,
6265
}) => {
6366
const activeEnvironment: CodeEnvironment = useMemo(() => {
6467
return (
@@ -106,7 +109,10 @@ export const CodeSegment: React.FC<CodeSegmentProps> = ({
106109

107110
{onlyTabs ? null : (
108111
<CodeClient
109-
className="rounded-none border-none grow"
112+
className={cn(
113+
"rounded-none border-none grow",
114+
codeContainerClassName,
115+
)}
110116
scrollableContainerClassName="h-full"
111117
code={code}
112118
lang={

apps/dashboard/src/@/components/contracts/functions/contract-function-comment.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ export default function ContractFunctionComment({
2222
return null;
2323
}
2424
return (
25-
<>
26-
<p className="mt-6">
25+
<div>
26+
<h3 className="text-base font-semibold mt-6 mb-3">
2727
About this function <Badge>Beta</Badge>
28-
</p>
28+
</h3>
2929
<CodeClient
3030
code={query.data}
3131
copyButtonClassName="hidden"
32-
lang="wikitext"
32+
lang="solidity"
33+
className="bg-background"
3334
/>
34-
</>
35+
</div>
3536
);
3637
}

0 commit comments

Comments
 (0)