-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix renamings. Support setting pad on Modal body. Use CSS grid correctly
- Loading branch information
Sarah Allen
committed
Apr 3, 2019
1 parent
016552e
commit f0b57a6
Showing
13 changed files
with
122 additions
and
97 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
36 changes: 36 additions & 0 deletions
36
...ents/FieldGuide/components/FieldGuide/components/FieldGuideItemIcon/FieldGuideItemIcon.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,36 @@ | ||
import zooTheme from '@zooniverse/grommet-theme' | ||
import React from 'react' | ||
import { Media } from '@zooniverse/react-components' | ||
import PropTypes from 'prop-types' | ||
|
||
export default function FieldGuideItemIcon({ alt, className, height, icon, viewBox, width }) { | ||
if (icon && Object.keys(icon).length > 0) { | ||
return ( | ||
<Media alt={alt} className={className} fit='contain' height={height} src={icon.src} width={width} /> | ||
) | ||
} | ||
|
||
return ( | ||
<svg className={className} viewBox={viewBox}> | ||
<rect fill={zooTheme.global.colors['accent-2']} height={height} width={width} /> | ||
</svg> | ||
) | ||
} | ||
|
||
FieldGuideItemIcon.defaultProps = { | ||
alt: '', | ||
className: '', | ||
height: '100%', | ||
icon: {}, | ||
viewBox: '0 0 100 100', | ||
width: '100%' | ||
} | ||
|
||
FieldGuideItemIcon.propTypes = { | ||
alt: PropTypes.string, | ||
className: PropTypes.string, | ||
height: PropTypes.string, | ||
icon: PropTypes.object, | ||
viewBox: PropTypes.string, | ||
width: PropTypes.string | ||
} |
Empty file.
1 change: 1 addition & 0 deletions
1
...sifier/components/FieldGuide/components/FieldGuide/components/FieldGuideItemIcon/index.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 @@ | ||
export { default } from './FieldGuideItemIcon' |
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
30 changes: 12 additions & 18 deletions
30
...components/FieldGuide/components/FieldGuide/components/FieldGuideItems/FieldGuideItems.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
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.