Skip to content

Commit

Permalink
Add icons to known platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
iAdramelk committed Dec 3, 2019
1 parent 0e0aa59 commit ef95e16
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Documentation/RightPanel/RightPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import startCase from 'lodash.startcase'
const ROOT_ELEMENT = 'bodybag'
const MARKDOWN_ROOT = '#markdown-root'

const icons = {
katacoda: '/static/tutorial-icons/katacoda.png'
}

const imageChecker = (images, callback) => {
// IE can't use forEach on array-likes
const imagesArray = Array.prototype.slice.call(images)
Expand Down Expand Up @@ -142,7 +146,8 @@ export default class RightPanel extends React.PureComponent {
<hr />
{tutorialsData.map(([key, value]) => (
<HeadingLink href={value} key={value} isCurrent={true}>
{startCase(key)}
{icons[key] && <Icon src={icons[key]} alt="" />}
Run in {startCase(key)}
</HeadingLink>
))}
<br />
Expand Down Expand Up @@ -264,3 +269,10 @@ const Spacer = styled.div`
const Description = styled.p`
color: #3c3937;
`

const Icon = styled.img`
float: left;
width: 16px;
height: 16px;
margin: 5px 5px 5px 0;
`
Binary file added static/tutorial-icons/katacoda.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ef95e16

Please sign in to comment.