This repository has been archived by the owner on Jan 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #595 from dat-land/refactor/clear-up-dom-locations
Refactor/clear up dom locations
- Loading branch information
Showing
11 changed files
with
113 additions
and
91 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
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,32 +1,23 @@ | ||
import React, { Fragment } from 'react' | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
import bytes from 'prettier-bytes' | ||
|
||
const Bar = styled.div` | ||
position: fixed; | ||
left: 0; | ||
bottom: 0; | ||
width: 100vw; | ||
padding: 0.5rem 1rem 0.75rem; | ||
const StatusBar = styled.footer` | ||
width: 100%; | ||
min-width: 800px; | ||
height: 2.5rem; | ||
padding: 0.25rem 0.75rem; | ||
background-color: var(--color-neutral-04); | ||
color: var(--color-neutral-60); | ||
` | ||
|
||
const StatusBar = ({ up, down, show }) => { | ||
if (!show) { | ||
return ( | ||
<Fragment> | ||
<div /> | ||
</Fragment> | ||
) | ||
} | ||
export default function ({ up, down, show }) { | ||
if (!show) return null | ||
|
||
return ( | ||
<Bar id='status-bar'> | ||
<StatusBar> | ||
<span className='f7 mr3'>Download: {bytes(down)}/s</span> | ||
<span className='f7'>Upload: {bytes(up)}/s</span> | ||
</Bar> | ||
</StatusBar> | ||
) | ||
} | ||
|
||
export default StatusBar |
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
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