Skip to content

Commit

Permalink
chore(www): cleanup TechWithIcon component (#25526)
Browse files Browse the repository at this point in the history
* cleanup TechWithIcon component

* fix lint error

* Update www/src/components/tech-with-icon.js

Co-authored-by: Nat Alison <1278991+tesseralis@users.noreply.github.com>
  • Loading branch information
abhishekjakhar and tesseralis committed Jul 9, 2020
1 parent c170509 commit 66f8856
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions www/src/components/tech-with-icon.js
@@ -1,23 +1,20 @@
import React from "react"

const TechWithIcon = ({ icon, height, children }) => {
let h = height ? height : `1.2em`
/** @jsx jsx */
import { jsx } from "theme-ui"

export default function TechWithIcon({ icon, height = `1.2em`, children }) {
return (
<span css={{ whiteSpace: `nowrap` }}>
<span sx={{ whiteSpace: `nowrap` }}>
{children}
&nbsp;
<img
src={icon}
alt=""
css={{
height: `${h}`,
margin: 0,
sx={{
verticalAlign: `text-bottom`,
height: `${height}`,
m: 0,
}}
/>
</span>
)
}

export default TechWithIcon

0 comments on commit 66f8856

Please sign in to comment.