-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add node information on the progress bar (#154)
Co-authored-by: lisuhan <[email protected]>
- Loading branch information
Showing
11 changed files
with
103 additions
and
2 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
25 changes: 25 additions & 0 deletions
25
packages/griffith/src/components/ProgressDot/ProgressDot.js
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 {css} from 'aphrodite/no-important' | ||
import formatPercent from '../../utils/formatPercent' | ||
import styles from './styles' | ||
|
||
const ProgressDotItem = ({startTime, total}) => { | ||
return ( | ||
<div | ||
className={css(styles.item)} | ||
style={{ | ||
left: formatPercent(startTime, total), | ||
}} | ||
/> | ||
) | ||
} | ||
const ProgressDots = ({progressDots = [], total}) => { | ||
return ( | ||
<div className={css(styles.root)}> | ||
{progressDots.map((i, index) => ( | ||
<ProgressDotItem key={index} startTime={i.startTime} total={total} /> | ||
))} | ||
</div> | ||
) | ||
} | ||
export default ProgressDots |
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 @@ | ||
export {default} from './ProgressDot' |
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,17 @@ | ||
import {StyleSheet} from 'aphrodite/no-important' | ||
|
||
export default StyleSheet.create({ | ||
root: { | ||
position: 'absolute', | ||
display: 'flex', | ||
top: 0, | ||
bottom: 0, | ||
width: '100%', | ||
}, | ||
item: { | ||
position: 'absolute', | ||
backgroundColor: '#ff9607', | ||
width: '6px', | ||
height: '100%', | ||
}, | ||
}) |
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