Skip to content

Commit ed21538

Browse files
authored
Merge pull request #498 from appirio-tech/work-project-icon
Fixes #375;
2 parents 71e52b7 + 231bdfc commit ed21538

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed
Lines changed: 9 additions & 0 deletions
Loading

src/components/ProjectType/ProjectType.jsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const typeMap = {
1919
visual_design: 'Visual Design Project',
2020
visual_prototype: 'Visual Prototype Project'
2121
}
22+
2223
/*eslint-enable camelcase */
2324
const ProjectType = ({projectId, type, description, devices}) => (
2425
<PanelProject>
@@ -32,20 +33,25 @@ const ProjectType = ({projectId, type, description, devices}) => (
3233
text={ description }
3334
textTruncateChild={<Link className="read-more-link" to={`/projects/${projectId}/specification`}>read more &gt;</Link>}
3435
/>
36+
3537
<div className="project-icons">
36-
<div className="icon-set">
37-
{devices.slice(0, 3).map((device) => deviceMap[device])}
38-
</div>
39-
{devices.length > 3 && <div className="icon-set">
40-
{devices.slice(3).map((device) => deviceMap[device])}
41-
</div>}
38+
{type === 'generic' &&
39+
<div key="GENERIC" className="icon icon-work-project">Work Project</div> }
40+
{type !== 'generic' &&
41+
<div className="icon-set">
42+
{devices.slice(0, 3).map((device) => deviceMap[device])}
43+
</div>}
44+
{type !== 'generic' && devices.length > 3 && <div className="icon-set">
45+
{devices.slice(3).map((device) => deviceMap[device])}
46+
</div>}
4247
</div>
48+
4349
</PanelProject>
4450
)
4551

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

5157
ProjectType.defaultProps = {

src/components/ProjectType/ProjectType.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
width: 40px;
2323
background-size: 32px;
2424
}
25+
26+
.icon-work-project{
27+
background: url('../../assets/images/tech-32px-outline-work-project.svg') no-repeat center top;
28+
width: 120px;
29+
}
2530
.icon-iphone{
2631
background: url('../../assets/images/tech-32-outline_mobile.svg') no-repeat center top;
2732
}

0 commit comments

Comments
 (0)