-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Show detail credential view in sidepanel
- Loading branch information
Jason Healy
committed
Jan 24, 2020
1 parent
efa30c5
commit 57f099b
Showing
7 changed files
with
125 additions
and
88 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
1 change: 0 additions & 1 deletion
1
examples/react-graphql/client/src/components/Credential/Credential.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
25 changes: 25 additions & 0 deletions
25
examples/react-graphql/client/src/components/Credential/CredentialDetail.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,25 @@ | ||
import React from 'react' | ||
import { Box, Heading, Text, Icon, Avatar } from 'rimble-ui' | ||
|
||
interface Props { | ||
onClick?: () => void | ||
} | ||
|
||
const Component: React.FC<Props> = ({ onClick }) => { | ||
return ( | ||
<Box border={1} borderRadius={5} borderColor={'#555555'} p={3} maxWidth={350} mb={16} onClick={onClick}> | ||
<Box flexDirection={'row'} display={'flex'} alignItems={'center'}> | ||
<Avatar size={'40'} src={''} /> | ||
<Box ml={2}> | ||
<Text fontWeight={'bold'}>Simon</Text> | ||
<Box flexDirection={'row'} display={'flex'}> | ||
<Icon name={'PlayArrow'} /> | ||
<Text>Mircea</Text> | ||
</Box> | ||
</Box> | ||
</Box> | ||
</Box> | ||
) | ||
} | ||
|
||
export default Component |
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 |
---|---|---|
@@ -1,10 +1,34 @@ | ||
import React from 'react' | ||
import { Flex, Box, Text, Heading, Button, Icon, Table, Field, Input } from 'rimble-ui' | ||
import { Switch, Route, useParams } from 'react-router-dom' | ||
import IdentityDetail from '../views/Identity/IdentityDetail' | ||
import { Box, Heading, Icon } from 'rimble-ui' | ||
import { useHistory } from 'react-router-dom' | ||
|
||
const Component = () => { | ||
return <IdentityDetail /> | ||
interface Props { | ||
title: string | ||
closeUrl: string | ||
} | ||
|
||
const Component: React.FC<Props> = ({ title, closeUrl, children }) => { | ||
let history = useHistory() | ||
|
||
return ( | ||
<Box width={450} bg="#1C1C1C" borderLeft={1} borderColor={'#4B4B4B'}> | ||
<Box | ||
p={3} | ||
borderColor={'#4B4B4B'} | ||
flexDirection={'row'} | ||
display={'flex'} | ||
justifyContent={'space-between'} | ||
alignItems={'center'} | ||
bg="#222222" | ||
> | ||
<Heading as={'h4'}>{title}</Heading> | ||
<Icon name={'Close'} onClick={() => history.push(closeUrl)} style={{ cursor: 'pointer' }} /> | ||
</Box> | ||
<Box p={3} pb={64} className={'scroll-container'}> | ||
{children} | ||
</Box> | ||
</Box> | ||
) | ||
} | ||
|
||
export default Component |
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