mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-01 13:47:06 +01:00
f7aea9dc34
* Created institutional-entity-done-page component * Added index file * Added css file and Boxes * Fixing prettier formatter * Fixed prettier format * Fixing prettier issues * Fixed prettier * Adding Text component * Removed styles and added story * Moving component to pages and improving styles --------- Co-authored-by: António Regadas <apregadas@gmail.com>
80 lines
2.2 KiB
JavaScript
80 lines
2.2 KiB
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { useSelector } from 'react-redux';
|
|
import Button from '../../../components/ui/button';
|
|
import { getMostRecentOverviewPage } from '../../../ducks/history/history';
|
|
import { useI18nContext } from '../../../hooks/useI18nContext';
|
|
import { Text } from '../../../components/component-library';
|
|
import {
|
|
TextColor,
|
|
BorderRadius,
|
|
TypographyVariant,
|
|
} from '../../../helpers/constants/design-system';
|
|
import Box from '../../../components/ui/box';
|
|
|
|
export default function InstitutionalEntityDonePage(props) {
|
|
const mostRecentOverviewPage = useSelector(getMostRecentOverviewPage);
|
|
const t = useI18nContext();
|
|
const { history, location } = props;
|
|
const { state } = location;
|
|
|
|
return (
|
|
<Box borderRadius={BorderRadius.none}>
|
|
<Box className="page-container__content">
|
|
<Box
|
|
paddingBottom={6}
|
|
paddingLeft={6}
|
|
paddingRight={6}
|
|
className="institutional-entity-done__form"
|
|
>
|
|
<Box
|
|
display={['flex']}
|
|
flexDirection={['column']}
|
|
alignItems={['center']}
|
|
>
|
|
<img
|
|
className="institutional-entity-done__img"
|
|
src={state.imgSrc}
|
|
alt="Entity image"
|
|
/>
|
|
<Text
|
|
as="h4"
|
|
marginTop={4}
|
|
marginBottom={4}
|
|
color={TextColor.textDefault}
|
|
>
|
|
{state.title}
|
|
</Text>
|
|
<Text
|
|
as="p"
|
|
color={TextColor.textAlternative}
|
|
marginTop={2}
|
|
marginBottom={5}
|
|
variant={TypographyVariant.headingSm}
|
|
>
|
|
{state.description}
|
|
</Text>
|
|
</Box>
|
|
</Box>
|
|
</Box>
|
|
<Box className="page-container__footer">
|
|
<footer>
|
|
<Button
|
|
type="primary"
|
|
large
|
|
data-testid="click-most-recent-overview-page"
|
|
onClick={() => history.push(mostRecentOverviewPage)}
|
|
>
|
|
<Text>{t('close')}</Text>
|
|
</Button>
|
|
</footer>
|
|
</Box>
|
|
</Box>
|
|
);
|
|
}
|
|
|
|
InstitutionalEntityDonePage.propTypes = {
|
|
history: PropTypes.object,
|
|
location: PropTypes.object,
|
|
};
|