-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tinlake-ui): fix tin ratio bar flickering, add pool titles, add …
…loan empty state (#50) * feat: add pool titles, add loan empty state, fix tin ratio bar flickering * fix: tranche overview cards shouldnt grow together * fix: comments * fix: improve read more button on tinlake explainer * chore: format * feat: collapse epoch data by default * fix: bulid
- Loading branch information
Jeroen Offerijns
authored
Dec 14, 2020
1 parent
f1086c0
commit cd566b0
Showing
13 changed files
with
278 additions
and
209 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
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,56 @@ | ||
import * as React from 'react' | ||
import styled from 'styled-components' | ||
import { Pool, UpcomingPool } from '../../config' | ||
|
||
interface Props { | ||
pool: Pool | UpcomingPool | ||
page: string | ||
} | ||
|
||
const PoolTitle: React.FC<Props> = (props: Props) => { | ||
return ( | ||
<Wrapper> | ||
<Icon | ||
src={ | ||
props.pool.metadata.media?.icon || 'https://storage.googleapis.com/tinlake/pool-media/icon-placeholder.svg' | ||
} | ||
/> | ||
<PageTitle> | ||
<PageName>{props.page}</PageName> | ||
<PoolName>{props.pool.metadata.name}</PoolName> | ||
</PageTitle> | ||
</Wrapper> | ||
) | ||
} | ||
|
||
export default PoolTitle | ||
|
||
const Wrapper = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
margin: 12px 0 36px 8px; | ||
` | ||
|
||
const Icon = styled.img` | ||
width: 40px; | ||
height: 40px; | ||
margin: 4px 16px 0 0; | ||
` | ||
|
||
const PageTitle = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
` | ||
|
||
const PageName = styled.h1` | ||
font-size: 18px; | ||
font-weight: bold; | ||
margin: 0; | ||
` | ||
|
||
const PoolName = styled.h2` | ||
font-size: 13px; | ||
font-weight: bold; | ||
margin: 0; | ||
color: #979797; | ||
` |
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
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
Oops, something went wrong.