-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Initial work from @irenejoeunpark with PR #2491
- Changed repos display to row, added border bottom for header, added hint icon for accordion
- Loading branch information
1 parent
974ae80
commit 3440918
Showing
4 changed files
with
168 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { createStyles, makeStyles, Theme, ListSubheader } from '@material-ui/core'; | ||
import Repos from './Repos'; | ||
import Issues from './Issues'; | ||
import PullRequests from './PullRequests'; | ||
import Commits from './Commits'; | ||
import Users from './Users'; | ||
import { filterGitHubUrls } from './GitHubInfo'; | ||
|
||
type Props = { | ||
ghUrls: string[]; | ||
}; | ||
|
||
const useStyles = makeStyles((theme: Theme) => | ||
createStyles({ | ||
root: { | ||
padding: '0', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
marginTop: '0', | ||
lineHeight: '1', | ||
[theme.breakpoints.up('lg')]: { | ||
width: '21rem', | ||
}, | ||
color: theme.palette.text.secondary, | ||
}, | ||
GitHubInfoContainer: { | ||
margin: '0 0 0 1rem', | ||
}, | ||
}) | ||
); | ||
|
||
const GitHubInfoMobile = ({ ghUrls }: Props) => { | ||
const classes = useStyles(); | ||
const { repos, issues, pullRequests, commits, users } = filterGitHubUrls(ghUrls); | ||
|
||
return ( | ||
<div> | ||
<ListSubheader className={classes.root}> | ||
<div className={classes.GitHubInfoContainer}> | ||
{!!repos.length && <Repos repoUrls={repos} />} | ||
{!!issues.length && <Issues issueUrls={issues} />} | ||
{!!pullRequests.length && <PullRequests prUrls={pullRequests} />} | ||
{!!commits.length && <Commits commitUrls={commits} />} | ||
{!!users.length && <Users usernames={users} />} | ||
</div> | ||
</ListSubheader> | ||
</div> | ||
); | ||
}; | ||
|
||
export default GitHubInfoMobile; |
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