-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Internal shared example component lib (#73)
* Internal shared example component lib * Moving Footer to shared components * Fixing next logo path * Adding CardButton to shared components
- Loading branch information
1 parent
002a428
commit 4fdbf5e
Showing
29 changed files
with
105 additions
and
236 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "@0xsequence/kit-example-shared-components", | ||
"exports": { | ||
".": "./src/index.ts" | ||
}, | ||
"dependencies": { | ||
"typescript": "latest" | ||
}, | ||
"peerDependencies": { | ||
"@0xsequence/design-system": "*", | ||
"wagmi": "*" | ||
} | ||
} |
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,32 @@ | ||
import { Card, Box, Text, Spinner } from '@0xsequence/design-system' | ||
|
||
interface CardButtonProps { | ||
title: string | ||
description: string | ||
onClick: () => void | ||
isPending?: boolean | ||
} | ||
|
||
export const CardButton = (props: CardButtonProps) => { | ||
const { title, description, onClick, isPending } = props | ||
|
||
return ( | ||
<Card clickable onClick={onClick}> | ||
<Text variant="normal" fontWeight="bold" color="text100"> | ||
{title} | ||
</Text> | ||
<Text as="div" variant="normal" color="text50" marginTop="2"> | ||
{description} | ||
</Text> | ||
|
||
{isPending && ( | ||
<Box gap="2" alignItems="center" marginTop="4"> | ||
<Spinner size="sm" /> | ||
<Text variant="small" color="text50"> | ||
Pending... | ||
</Text> | ||
</Box> | ||
)} | ||
</Card> | ||
) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export { Header } from './Header' | ||
export { Footer } from './Footer' | ||
export { CardButton } from './CardButton' |
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,15 @@ | ||
{ | ||
"compilerOptions": { | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"isolatedModules": true, | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"preserveWatchOutput": true, | ||
"skipLibCheck": true, | ||
"noEmit": true, | ||
"strict": true, | ||
"jsx": "react-jsx" | ||
}, | ||
"exclude": ["node_modules"] | ||
} |
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
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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
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
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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.