Skip to content

Commit

Permalink
fix(components): fix as comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jennieramida committed May 23, 2023
1 parent 1ec3ac1 commit 181e7ae
Show file tree
Hide file tree
Showing 123 changed files with 237 additions and 254 deletions.
2 changes: 1 addition & 1 deletion src/lib/app-fns/tx/clearAdmin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const clearAdminTx = ({
<CustomIcon
name="check-circle-solid"
color="success.main"
boxSize="5"
boxSize={5}
/>
),
},
Expand Down
2 changes: 1 addition & 1 deletion src/lib/app-fns/tx/common/catchTxError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const catchTxError = (
<CustomIcon
name="alert-circle-solid"
color="error.light"
boxSize="5"
boxSize={5}
/>
),
},
Expand Down
2 changes: 1 addition & 1 deletion src/lib/app-fns/tx/execute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const executeContractTx = ({
<CustomIcon
name="check-circle-solid"
color="success.main"
boxSize="5"
boxSize={5}
/>
),
},
Expand Down
2 changes: 1 addition & 1 deletion src/lib/app-fns/tx/resend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const resendTx = ({
<CustomIcon
name="check-circle-solid"
color="success.main"
boxSize="5"
boxSize={5}
/>
),
},
Expand Down
2 changes: 1 addition & 1 deletion src/lib/app-fns/tx/submitProposal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const submitProposalTx = ({
<CustomIcon
name="submit-proposal-solid"
color="gray.600"
boxSize="5"
boxSize={5}
/>
),
},
Expand Down
2 changes: 1 addition & 1 deletion src/lib/app-fns/tx/upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const uploadContractTx = ({
</>
),
headerIcon: (
<CustomIcon name="upload-cloud" boxSize="5" color="gray.600" />
<CustomIcon name="upload-cloud" boxSize={5} color="gray.600" />
),
},
actionVariant: isMigrate ? "upload-migrate" : "upload",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/ButtonCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ButtonCard = ({
}: ButtonCardProps) => (
<Flex
aria-disabled={disabled}
p="24px"
p={6}
align="center"
justify="space-between"
onClick={!disabled ? onClick : undefined}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/ConnectWalletAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ export const ConnectWalletAlert = ({
variant="accent"
alignItems="center"
justifyContent="space-between"
py="12px"
py={3}
>
<Flex gap={2}>
<CustomIcon name="wallet-solid" boxSize="4" />
<CustomIcon name="wallet-solid" boxSize={4} />
<Box>
<AlertTitle>{title}</AlertTitle>
<AlertDescription>{subtitle}</AlertDescription>
Expand Down
1 change: 0 additions & 1 deletion src/lib/components/ContractCmdButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const ContractCmdButton = ({
variant="command-button"
fontSize="12px"
height="24px"
px="10px"
borderRadius="16px"
fontWeight={400}
onClick={onClickCmd}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/ContractSelectSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export const ContractSelectSection = observer(
mb={style.container}
borderWidth="thin"
borderColor="gray.800"
p="16px"
p={4}
borderRadius="8px"
fontSize="12px"
justify="space-between"
Expand Down Expand Up @@ -235,7 +235,7 @@ export const ContractSelectSection = observer(
label={contractState.label}
/>
</Flex>
<Flex gap="8px" alignItems="center">
<Flex gap={2} alignItems="center">
{mode === "all-lists" && contractState.isValid && (
<ContractDetailsButton
contractAddress={contractAddress}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/CustomTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const CustomTab = ({ count, ...restProps }: CustomTabProps) => {
{tabProps.children}

{count !== undefined && (
<Badge variant={isSelected ? "primary" : "gray"} ml="6px">
<Badge variant={isSelected ? "primary" : "gray"} ml={2}>
{count}
</Badge>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/DotSeparator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box } from "@chakra-ui/react";

export const DotSeparator = () => (
<Box bg="secondary.darker" borderRadius="50%" w="4px" h="4px" />
<Box bg="secondary.darker" borderRadius="50%" w={1} h={1} />
);
5 changes: 0 additions & 5 deletions src/lib/components/DotSeperator.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib/components/ErrorMessageRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const ErrorMessageRender = ({
...restProps
}: ErrorMessageRenderProps) => (
<Flex gap={2} {...restProps}>
<CustomIcon name="alert-circle-solid" color="error.main" boxSize="3" />
<CustomIcon name="alert-circle-solid" color="error.main" boxSize={3} />
<Text variant="body3" color="error.main">
{error}
</Text>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/Expedited.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const Expedited = ({ isActiveExpedited }: ExpeditedProps) => (
<Flex align="center">
<CustomIcon
name="expedited"
boxSize="4"
ml="0"
boxSize={4}
ml={0}
color={isActiveExpedited ? "accent.main" : "gray.400"}
/>
<Text
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/ExplorerLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export const ExplorerLink = ({
value={copyValue || value}
copyLabel={copyValue ? `${getCopyLabel(type)} Copied!` : undefined}
display={showCopyOnHover ? "none" : "block"}
ml="8px"
ml={2}
amptrackSection={ampCopierSection}
/>
</>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/InputWithIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const InputWithIcon = ({
size={size}
onClick={action ? () => AmpTrack(AmpEvent.USE_SEARCH_INPUT) : undefined}
/>
<InputRightElement h="56px" alignItems="center" mr="1">
<InputRightElement h="56px" alignItems="center" mr={1}>
<CustomIcon name="search" color="gray.600" />
</InputRightElement>
</InputGroup>
Expand Down
12 changes: 6 additions & 6 deletions src/lib/components/ListSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const ListSelection = forwardRef<HTMLInputElement, ListSelectionProps>(
overflowX="scroll"
>
{result.length > 0 && (
<Flex alignItems="center" pl="2">
<Flex alignItems="center" pl={2}>
{[...result].map((option) => (
<Flex
display="inline-block"
Expand All @@ -149,7 +149,7 @@ export const ListSelection = forwardRef<HTMLInputElement, ListSelectionProps>(
mr={1}
>
{option.label}
<CustomIcon name="close" boxSize="3" />
<CustomIcon name="close" boxSize={3} />
</Tag>
</Flex>
))}
Expand Down Expand Up @@ -195,8 +195,8 @@ export const ListSelection = forwardRef<HTMLInputElement, ListSelectionProps>(
<List
borderRadius="8px"
bg="gray.800"
px="2"
py="1"
px={2}
py={1}
mt={0}
position="absolute"
zIndex="2"
Expand All @@ -222,7 +222,7 @@ export const ListSelection = forwardRef<HTMLInputElement, ListSelectionProps>(
mr={2}
name="check"
color="gray.600"
boxSize="3"
boxSize={3}
/>
)}
</Flex>
Expand All @@ -241,7 +241,7 @@ export const ListSelection = forwardRef<HTMLInputElement, ListSelectionProps>(
onClick={() => setEnableOutside(false)}
>
<Flex alignItems="center" gap={2}>
<CustomIcon name="plus" color="text.dark" boxSize="3" />
<CustomIcon name="plus" color="text.dark" boxSize={3} />
<Text variant="body2">Create New List </Text>
</Flex>
</ListItem>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/Loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export const Loading = () => (
borderY="1px solid"
borderColor="gray.700"
width="full"
py="60px"
py={15}
my={12}
flexDirection="column"
alignItems="center"
>
<Spinner size="xl" />
<Text mt="20px">Loading ...</Text>
<Text mt={5}>Loading ...</Text>
</Flex>
);
2 changes: 1 addition & 1 deletion src/lib/components/OffChainForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const OffChainForm = <T extends OffchainDetail>({
errors,
labelBgColor = "background.main",
}: OffChainFormProps<T>) => (
<VStack gap="16px" w="full">
<VStack gap={4} w="full">
<ControllerInput
name={"name" as FieldPath<T>}
control={control}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/PageContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type PageContainerProps = {
};

const PageContainer = ({ children }: PageContainerProps) => (
<Box as="main" p="48px" overflowX="hidden" minH="inherit">
<Box as="main" p={12} overflowX="hidden" minH="inherit">
{children}
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/PublicDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const PublicDescription = ({
>
<Flex align="center" gap={1} h="32px">
{icon}
<Text variant="body2" fontWeight={500} color="text.dark" mt="1px">
<Text variant="body2" fontWeight={500} color="text.dark">
{title}
</Text>
</Flex>
Expand Down
10 changes: 5 additions & 5 deletions src/lib/components/TagSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const TagSelection = observer(
overflowX="scroll"
>
{result.length > 0 && (
<Flex alignItems="center" pl="2">
<Flex alignItems="center" pl={2}>
{result.map((option) => (
<Flex
display="inline-block"
Expand All @@ -154,7 +154,7 @@ export const TagSelection = observer(
>
<Tag gap={1} mr={1} cursor="pointer">
{option}
<CustomIcon name="close" boxSize="3" />
<CustomIcon name="close" boxSize={3} />
</Tag>
</Flex>
))}
Expand Down Expand Up @@ -202,8 +202,8 @@ export const TagSelection = observer(
<List
borderRadius="8px"
bg="gray.800"
px="2"
py="1"
px={2}
py={1}
mt={0}
position="absolute"
zIndex="2"
Expand Down Expand Up @@ -247,7 +247,7 @@ export const TagSelection = observer(
mr={2}
name="check"
color="gray.600"
boxSize="3"
boxSize={3}
/>
)}
</Flex>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/TokenCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ export const TokenCard = ({
>
{symbol}
</Text>
<Badge variant="gray" ml="6px">
<Badge variant="gray" ml={2}>
{price ? formatPrice(price as USD<number>) : "N/A"}
</Badge>
<Copier
type={price ? "supported_asset" : "unsupported_asset"}
value={id}
copyLabel="Token ID Copied!"
display="none"
ml="1px"
ml={1}
amptrackSection={amptrackSection}
/>
</Flex>
Expand Down
8 changes: 4 additions & 4 deletions src/lib/components/TxFilterSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const TxFilterSelection = forwardRef<
overflowX="scroll"
>
{result.length > 0 && (
<Flex alignItems="center" pl="2">
<Flex alignItems="center" pl={2}>
{[...result].reverse().map((option) => (
<Flex
display="inline-block"
Expand All @@ -132,7 +132,7 @@ export const TxFilterSelection = forwardRef<
cursor="pointer"
>
{displayActionValue(option)}
<CustomIcon name="close" boxSize="3" />
<CustomIcon name="close" boxSize={3} />
</Tag>
</Flex>
))}
Expand Down Expand Up @@ -179,8 +179,8 @@ export const TxFilterSelection = forwardRef<
<List
borderRadius="8px"
bg="gray.900"
px="2"
py="1"
px={2}
py={1}
mt={0}
position="absolute"
zIndex="2"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/ViewPermissionAddresses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const ViewPermissionAddresses = ({
rightIcon={
<CustomIcon
name={viewAll ? "chevron-up" : "chevron-down"}
boxSize="3"
boxSize={3}
/>
}
>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/WasmPageContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const WasmPageContainer = ({
align="center"
width={width}
mx="auto"
py="48px"
py={12}
direction="column"
>
{children}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/action-msg/SingleMsg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ export const SingleMsg = ({
</Text>
<Tooltip label={`Token ID: ${token.id}`} maxW="240px">
<Flex cursor="pointer">
<CustomIcon name="info-circle" boxSize="3" color="gray.600" />
<CustomIcon name="info-circle" boxSize={3} color="gray.600" />
</Flex>
</Tooltip>
<Copier
type={token.symbol ? "supported_asset" : "unsupported_asset"}
value={token.id}
copyLabel="Token ID Copied!"
display="none"
ml="4px"
ml={1}
/>
</Flex>
))}
Expand Down
6 changes: 3 additions & 3 deletions src/lib/components/button/BackButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ export const BackButton = (props: ButtonProps) => {
<Button
variant="ghost-secondary"
size="sm"
mb="8px"
mb={2}
p="unset"
pr="2"
pr={2}
onClick={() => {
AmpTrack(AmpEvent.USE_BACK_BUTTON);
router.back();
}}
{...props}
>
<CustomIcon name="chevron-left" boxSize="3" mr={2} />
<CustomIcon name="chevron-left" boxSize={3} mr={2} />
BACK
</Button>
);
Expand Down
Loading

0 comments on commit 181e7ae

Please sign in to comment.