Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions components/InputBadge/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { InfoIcon } from '@chakra-ui/icons';
import { Badge, BadgeProps, Fade, Flex, Text } from '@chakra-ui/react';
import { PropsWithChildren } from 'react';

interface InputBadgeProps {
colorScheme?: BadgeProps['colorScheme'];
text: string;
onClickIcon?: () => void;
onClick?: () => void;
active: boolean;
}

export default function InputBadge({
colorScheme,
text,
onClickIcon,
onClick,
active,
}: PropsWithChildren<InputBadgeProps>) {
return (
<Fade in>
<Badge
colorScheme={active ? 'cyan' : colorScheme}
padding="1.5"
variant={active ? 'solid' : 'subtle'}
onClick={onClick}
w="100%"
minW={170}
cursor="pointer"
>
<Flex justify="space-between" align="center">
<Text
fontSize="xs"
color={active ? 'black' : 'cyan.500'}
fontFamily="body"
userSelect="none"
>
{text}
</Text>
{onClickIcon && (
<InfoIcon w={4} h={4} color={active ? 'black' : 'cyan.500'} onClick={onClickIcon} />
)}
</Flex>
</Badge>
</Fade>
);
}
1 change: 0 additions & 1 deletion content/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ const InnerApp: FC<AppProps> = ({ Component, pageProps }) => {

const App: FC<AppProps> = (props) => {
const { t } = useTranslation();

return (
<>
<Head>
Expand Down
23 changes: 23 additions & 0 deletions content/BurnPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import InputBadge from 'components/InputBadge';
import Head from 'next/head';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';

export default function BurnDebt() {
const { t } = useTranslation();
const [active, setActive] = useState(false);
return (
<>
<Head>
<title>{t('burn.title')}</title>
</Head>
<InputBadge
colorScheme="whiteAlpha"
text="test"
onClick={() => setActive(!active)}
onClickIcon={() => {}}
active={active}
/>
</>
);
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
},
"dependencies": {
"@artsy/fresnel": "^1.8.0",
"@chakra-ui/icons": "^2.0.8",
"@chakra-ui/react": "^2.2.8",
"@emotion/react": "^11.10.0",
"@emotion/styled": "^11.10.0",
Expand Down
9 changes: 9 additions & 0 deletions pages/burn.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import dynamic from 'next/dynamic';
import GlobalLoader from 'components/GlobalLoader';

const BurnPage = dynamic(() => import('content/BurnPage'), {
ssr: false,
loading: GlobalLoader,
});

export default BurnPage;
3 changes: 3 additions & 0 deletions translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1542,5 +1542,8 @@
"pools": "pools",
"bridge": "bridge",
"migrate-escrow": "migrate escrow"
},
"burn": {
"title": "Burn Debt"
}
}
13 changes: 13 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,18 @@ __metadata:
languageName: node
linkType: hard

"@chakra-ui/icons@npm:^2.0.8":
version: 2.0.8
resolution: "@chakra-ui/icons@npm:2.0.8"
dependencies:
"@chakra-ui/icon": 3.0.8
peerDependencies:
"@chakra-ui/system": ">=2.0.0"
react: ">=18"
checksum: b94a9a2db439d35566874d1c14cec79402b88edd83ce05d8bf962d99550315d87766ae8c277f5e1c4f20672c21d511a1b08f168535ced6e272d84823c84d241a
languageName: node
linkType: hard

"@chakra-ui/image@npm:2.0.9":
version: 2.0.9
resolution: "@chakra-ui/image@npm:2.0.9"
Expand Down Expand Up @@ -14678,6 +14690,7 @@ __metadata:
resolution: "staking@workspace:."
dependencies:
"@artsy/fresnel": ^1.8.0
"@chakra-ui/icons": ^2.0.8
"@chakra-ui/react": ^2.2.8
"@emotion/react": ^11.10.0
"@emotion/styled": ^11.10.0
Expand Down