Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/assets/images/tech-32px-outline-work-project.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 13 additions & 7 deletions src/components/ProjectType/ProjectType.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const typeMap = {
visual_design: 'Visual Design Project',
visual_prototype: 'Visual Prototype Project'
}

/*eslint-enable camelcase */
const ProjectType = ({projectId, type, description, devices}) => (
<PanelProject>
Expand All @@ -32,20 +33,25 @@ const ProjectType = ({projectId, type, description, devices}) => (
text={ description }
textTruncateChild={<Link className="read-more-link" to={`/projects/${projectId}/specification`}>read more &gt;</Link>}
/>

<div className="project-icons">
<div className="icon-set">
{devices.slice(0, 3).map((device) => deviceMap[device])}
</div>
{devices.length > 3 && <div className="icon-set">
{devices.slice(3).map((device) => deviceMap[device])}
</div>}
{type === 'generic' &&
<div key="GENERIC" className="icon icon-work-project">Work Project</div> }
{type !== 'generic' &&
<div className="icon-set">
{devices.slice(0, 3).map((device) => deviceMap[device])}
</div>}
{type !== 'generic' && devices.length > 3 && <div className="icon-set">
{devices.slice(3).map((device) => deviceMap[device])}
</div>}
</div>

</PanelProject>
)

ProjectType.propTypes = {
type: PropTypes.string.isRequired,
devices: PropTypes.arrayOf(PropTypes.oneOf(['phone', 'tablet', 'desktop', 'apple-watch', 'android-watch'])).isRequired
devices: PropTypes.arrayOf(PropTypes.oneOf(['generic', 'phone', 'tablet', 'desktop', 'apple-watch', 'android-watch'])).isRequired
}

ProjectType.defaultProps = {
Expand Down
5 changes: 5 additions & 0 deletions src/components/ProjectType/ProjectType.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
width: 40px;
background-size: 32px;
}

.icon-work-project{
background: url('../../assets/images/tech-32px-outline-work-project.svg') no-repeat center top;
width: 120px;
}
.icon-iphone{
background: url('../../assets/images/tech-32-outline_mobile.svg') no-repeat center top;
}
Expand Down