generated from scaffold-eth/scaffold-eth-2
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve component reusability and wrap up price feeds
- Loading branch information
1 parent
1d24929
commit b7778c9
Showing
13 changed files
with
225 additions
and
202 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
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { ArrowTopRightOnSquareIcon } from "@heroicons/react/24/outline"; | ||
|
||
interface ExternalLinkProps { | ||
href: string; | ||
} | ||
|
||
export const ExternalLink: React.FC<ExternalLinkProps> = ({ href }) => { | ||
return ( | ||
<a | ||
href={href} | ||
className="capitalize text-primary hover:underline btn btn-sm bg-accent px-1 rounded-lg hover:bg-accent-focus hover:text-white" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<ArrowTopRightOnSquareIcon className="h-4 w-5 inline" /> | ||
</a> | ||
); | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { ReactNode } from "react"; | ||
|
||
interface InformationSectionProps { | ||
summary: ReactNode; | ||
details: ReactNode[]; | ||
gettingStarted: ReactNode[]; | ||
} | ||
|
||
export const InformationSection: React.FC<InformationSectionProps> = ({ summary, details, gettingStarted }) => { | ||
return ( | ||
<section> | ||
<div className="mb-10"> | ||
<h3 className="text-3xl font-bold">Summary</h3> | ||
<p className="text-xl">{summary}</p> | ||
</div> | ||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-14"> | ||
<div> | ||
<h3 className="text-3xl font-bold">Getting Started</h3> | ||
<ol className="text-xl list-decimal list-inside"> | ||
{gettingStarted.map((step, index) => ( | ||
<li key={index} className="mb-1"> | ||
{step} | ||
</li> | ||
))} | ||
</ol> | ||
</div> | ||
<div> | ||
<h3 className="text-3xl font-bold">Details</h3> | ||
<ul className="text-xl list-disc list-inside"> | ||
{details.map((detail, index) => ( | ||
<li key={index} className="mb-1 text-xl"> | ||
{detail} | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type Props = { | ||
text: string; | ||
}; | ||
|
||
export const InlineCode: React.FC<Props> = ({ text }) => { | ||
return <code className="bg-base-100 text-neutral-100 border border-base-300 py-0.5 px-1.5 rounded-md">{text}</code>; | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from "./ExternalLink"; | ||
export * from "./InlineCode"; | ||
export * from "./InformationSection"; |
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
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
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
Oops, something went wrong.