Skip to content

Commit 9600ee8

Browse files
committed
Use the existing CodeBlock for the tip
1 parent 3910189 commit 9600ee8

File tree

2 files changed

+11
-12
lines changed
  • apps/webapp/app
    • components/code
    • routes/resources.orgs.$organizationSlug.projects.$projectParam.waitpoints.$waitpointFriendlyId.complete

2 files changed

+11
-12
lines changed

apps/webapp/app/components/code/CodeBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ type CodeBlockProps = {
5050
fileName?: string;
5151

5252
/** title text for the Title row */
53-
rowTitle?: string;
53+
rowTitle?: ReactNode;
5454
};
5555

5656
const dimAmount = 0.5;

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.waitpoints.$waitpointFriendlyId.complete/route.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,20 +161,19 @@ export function CompleteWaitpointForm({ waitpoint }: { waitpoint: FormWaitpoint
161161
</div>
162162
</div>
163163
</Form>
164-
<div className="rounded-md border border-charcoal-700 bg-charcoal-800">
165-
<div className="flex items-center gap-2 px-2 pt-2">
166-
<InformationCircleIcon className="h-5 w-5 shrink-0 text-text-dimmed" />
167-
<Paragraph variant="small">To complete this waitpoint in your code use:</Paragraph>
168-
</div>
169-
<CodeBlock
170-
code={`
164+
<CodeBlock
165+
rowTitle={
166+
<div className="-ml-1 flex items-center gap-1 text-text-dimmed">
167+
<InformationCircleIcon className="size-5 shrink-0 text-text-dimmed" />
168+
To complete this waitpoint in your code use:
169+
</div>
170+
}
171+
code={`
171172
await wait.completeToken<YourType>(tokenId,
172173
output
173174
);`}
174-
className="mt-1 max-w-full border-0 pl-1"
175-
showLineNumbers={false}
176-
/>
177-
</div>
175+
showLineNumbers={false}
176+
/>
178177
</div>
179178
);
180179
}

0 commit comments

Comments
 (0)