-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from alleslabs/page/contract-detail-skeleton
feat(pages): contract details page skeleton
- Loading branch information
Showing
27 changed files
with
340 additions
and
28 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 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.
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
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.
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
37 changes: 37 additions & 0 deletions
37
src/lib/pages/contract-details/components/CommandSection.tsx
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,37 @@ | ||
import { Flex, Text } from "@chakra-ui/react"; | ||
|
||
export const CommandSection = () => { | ||
/** | ||
* @todos | ||
* - Make an interface | ||
* - Wireup with real query/execute commands data | ||
*/ | ||
return ( | ||
<Flex gap={6}> | ||
<Flex | ||
direction="column" | ||
bg="gray.900" | ||
p={4} | ||
borderRadius="8px" | ||
flex={0.5} | ||
> | ||
<Text color="text.dark" variant="body2" fontWeight={500} mb={2}> | ||
Query Shortcuts | ||
</Text> | ||
{/* Query Contract Commands */} | ||
</Flex> | ||
<Flex | ||
direction="column" | ||
bg="gray.900" | ||
p={4} | ||
borderRadius="8px" | ||
flex={0.5} | ||
> | ||
<Text color="text.dark" variant="body2" fontWeight={500} mb={2}> | ||
Execute Shortcuts | ||
</Text> | ||
{/* Execute Contract Commands */} | ||
</Flex> | ||
</Flex> | ||
); | ||
}; |
31 changes: 31 additions & 0 deletions
31
src/lib/pages/contract-details/components/InstantiateInfo.tsx
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,31 @@ | ||
import { Flex, Heading } from "@chakra-ui/react"; | ||
|
||
import { ExplorerLink } from "lib/components/ExplorerLink"; | ||
|
||
import { LabelText } from "./LabelText"; | ||
|
||
export const InstantiateInfo = () => { | ||
/** | ||
* @todos | ||
* - Make an interface | ||
* - All these are mockups, Wireup with real data and map render LabelText | ||
*/ | ||
return ( | ||
<Flex direction="column" gap={6} w="160px"> | ||
<Heading as="h6" variant="h6"> | ||
Instantiate Info | ||
</Heading> | ||
<LabelText label="Network">phoenix-1</LabelText> | ||
<LabelText label="Instantiated by" helperText="(Wallet Address)"> | ||
<ExplorerLink | ||
type="user_address" | ||
value="osmo1wke7j8f5kgnnacs3avchcj6fvvdtvrsalzmddx" | ||
canCopyWithHover | ||
/> | ||
</LabelText> | ||
<LabelText label="IBC Port ID"> | ||
wasm.terra1te47jv6pg272n8unq490nvhh5m43v5n5kxfgrztly2tmkmqxzw8qphrjx2 | ||
</LabelText> | ||
</Flex> | ||
); | ||
}; |
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,24 @@ | ||
import { Flex, Heading, Icon } from "@chakra-ui/react"; | ||
import { FiChevronDown } from "react-icons/fi"; | ||
|
||
interface JsonInfoProps { | ||
header: string; | ||
} | ||
|
||
export const JsonInfo = ({ header }: JsonInfoProps) => { | ||
/** | ||
* @todos | ||
* - Configure interface | ||
* - Make this component collapsible | ||
* - Wireup with real data | ||
* - Render the data in JSON Readonly Editor | ||
*/ | ||
return ( | ||
<Flex justify="space-between" align="center" p="8px 16px"> | ||
<Heading as="h6" variant="h6"> | ||
{header} | ||
</Heading> | ||
<Icon as={FiChevronDown} color="text.dark" boxSize={5} /> | ||
</Flex> | ||
); | ||
}; |
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,27 @@ | ||
import { Flex, Text } from "@chakra-ui/react"; | ||
|
||
interface LabelTextProps { | ||
label: string; | ||
children: string | JSX.Element; | ||
helperText?: string; | ||
} | ||
|
||
export const LabelText = ({ label, children, helperText }: LabelTextProps) => { | ||
return ( | ||
<Flex direction="column" gap={1}> | ||
<Text variant="body2" color="text.dark" fontWeight={500}> | ||
{label} | ||
</Text> | ||
{typeof children === "string" ? ( | ||
<Text variant="body2">{children}</Text> | ||
) : ( | ||
children | ||
)} | ||
{helperText && ( | ||
<Text variant="body3" color="text.dark"> | ||
{helperText} | ||
</Text> | ||
)} | ||
</Flex> | ||
); | ||
}; |
33 changes: 33 additions & 0 deletions
33
src/lib/pages/contract-details/components/TokenSection.tsx
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,33 @@ | ||
import { Flex, Text } from "@chakra-ui/react"; | ||
|
||
/** | ||
* @todos | ||
* - Make an interface for TokenSection and TokenCard | ||
* - Wireup with real data | ||
* - Token icon | ||
*/ | ||
const TokenCard = () => { | ||
return ( | ||
<Flex gap={1} p={2} background="gray.900" borderRadius="8px" flex={0.25}> | ||
<Text color="text.main"> | ||
<span style={{ fontWeight: 700 }}>1.00</span> LUNA | ||
</Text> | ||
</Flex> | ||
); | ||
}; | ||
|
||
export const TokenSection = () => { | ||
return ( | ||
<Flex direction="column"> | ||
<Text variant="body2" color="text.dark" mb={1} fontWeight={500}> | ||
Tokens | ||
</Text> | ||
<Flex gap={4}> | ||
<TokenCard /> | ||
<TokenCard /> | ||
<TokenCard /> | ||
<TokenCard /> | ||
</Flex> | ||
</Flex> | ||
); | ||
}; |
Oops, something went wrong.
354bd84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
celatone-frontend – ./
celatone-frontend-alles-labs.vercel.app
celatone-frontend.vercel.app
celatone-frontend-git-main-alles-labs.vercel.app
osmosis.celat.one