diff --git a/src/components/GithHubIcon.js b/src/components/GithHubIcon.js new file mode 100644 index 000000000..8be72ba2a --- /dev/null +++ b/src/components/GithHubIcon.js @@ -0,0 +1,26 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import cx from 'classnames'; +import styles from './GithHubIcon.module.scss'; + +const GithHubIcon = ({ className }) => ( + + + +); + +GithHubIcon.propTypes = { + className: PropTypes.string, +}; + +export default GithHubIcon; diff --git a/src/components/GithHubIcon.module.scss b/src/components/GithHubIcon.module.scss new file mode 100644 index 000000000..6eea8df95 --- /dev/null +++ b/src/components/GithHubIcon.module.scss @@ -0,0 +1,4 @@ +.icon { + fill: none; + width: var(--icon-size, 15px); +} diff --git a/src/components/GlobalHeader.js b/src/components/GlobalHeader.js index 81ad67851..c737fa2a6 100644 --- a/src/components/GlobalHeader.js +++ b/src/components/GlobalHeader.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import cx from 'classnames'; import { Link } from 'gatsby'; import NewRelicLogo from './NewRelicLogo'; +import GithHubIcon from './GithHubIcon'; import ExternalLink from './ExternalLink'; import styles from './GlobalHeader.module.scss'; @@ -45,12 +46,12 @@ const GlobalHeader = ({ className }) => { diff --git a/src/components/GlobalHeader.module.scss b/src/components/GlobalHeader.module.scss index eea44b600..b7cad4537 100644 --- a/src/components/GlobalHeader.module.scss +++ b/src/components/GlobalHeader.module.scss @@ -69,41 +69,18 @@ } .rightSideButton { - width: 14px; - height: 14px; - text-indent: 300%; - white-space: nowrap; - overflow: hidden; - padding: 0; opacity: 0.45; - background-repeat: no-repeat; - background-position: center; - transition: opacity 0.1s var(--ease-out-quad); + transition: opacity 0.2s ease-out; &:hover { cursor: pointer; opacity: 0.75; } - - &:last-child { - padding-right: 0; - background-position: right; - } -} - -.githubButton { - display: block; - width: 15px; - height: 15px; - text-indent: 0; } .githubButtonLink { - display: block; - background-image: url('../images/icon-github.svg'); - text-indent: 100%; - white-space: nowrap; - overflow: hidden; + display: flex; + align-items: center; } // ==============================================================