-
Notifications
You must be signed in to change notification settings - Fork 4
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 #73 from Smithsonian/develop
Release v0.4.0
- Loading branch information
Showing
386 changed files
with
35,761 additions
and
4,185 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 @@ | ||
save-exact = true |
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,3 @@ | ||
const { override, addExternalBabelPlugin } = require('customize-cra'); | ||
|
||
module.exports = override(addExternalBabelPlugin('react-activation/babel')); |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
import React from 'react'; | ||
import { Button, ButtonProps } from '@material-ui/core'; | ||
import Progress from '../shared/Progress'; | ||
|
||
type LoadingButtonProps = ButtonProps & { | ||
loading: boolean; | ||
loaderSize?: number; | ||
}; | ||
|
||
function LoadingButton(props: LoadingButtonProps): React.ReactElement { | ||
const { loading, loaderSize, ...rest } = props; | ||
|
||
return ( | ||
<Button {...rest}> | ||
{!loading && props.children} | ||
{loading && <Progress color='inherit' size={loaderSize || 20} />} | ||
</Button> | ||
); | ||
} | ||
|
||
export default LoadingButton; |
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,46 @@ | ||
import React from 'react'; | ||
import { Box, Typography } from '@material-ui/core'; | ||
import { makeStyles } from '@material-ui/core/styles'; | ||
import { eSystemObjectType } from '../../types/server'; | ||
import { getTermForSystemObjectType } from '../../utils/repository'; | ||
|
||
const useStyles = makeStyles(({ typography, breakpoints }) => ({ | ||
container: { | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
height: 20, | ||
width: 20, | ||
borderRadius: 2.5, | ||
backgroundColor: ({ backgroundColor }: RepositoryIconProps) => backgroundColor, | ||
[breakpoints.down('lg')]: { | ||
height: 15, | ||
width: 15, | ||
}, | ||
}, | ||
initial: { | ||
fontSize: 10, | ||
fontWeight: typography.fontWeightBold, | ||
color: ({ textColor }: RepositoryIconProps) => textColor, | ||
} | ||
})); | ||
|
||
interface RepositoryIconProps { | ||
objectType: eSystemObjectType; | ||
backgroundColor: string; | ||
textColor: string; | ||
} | ||
|
||
function RepositoryIcon(props: RepositoryIconProps): React.ReactElement { | ||
const { objectType } = props; | ||
const classes = useStyles(props); | ||
const initial = getTermForSystemObjectType(objectType).toUpperCase().slice(0, 1); | ||
|
||
return ( | ||
<Box className={classes.container}> | ||
<Typography className={classes.initial}>{initial}</Typography> | ||
</Box> | ||
); | ||
} | ||
|
||
export default RepositoryIcon; |
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.