diff --git a/src/templates/Typedoc/TocScroll.jsx b/src/components/Scroll.jsx similarity index 93% rename from src/templates/Typedoc/TocScroll.jsx rename to src/components/Scroll.jsx index c94ff3dc..e50270ab 100644 --- a/src/templates/Typedoc/TocScroll.jsx +++ b/src/components/Scroll.jsx @@ -8,8 +8,7 @@ export default class TocScroll extends React.Component { element: PropTypes.string, offset: PropTypes.number, timeout: PropTypes.number, - children: PropTypes.node.isRequired, - deprecation: PropTypes.bool + children: PropTypes.node.isRequired } componentDidMount() { @@ -75,7 +74,7 @@ export default class TocScroll extends React.Component { {this.props.children} diff --git a/src/components/Sidebar.module.scss b/src/components/Sidebar.module.scss index e8c3d50d..3b2ea2f4 100644 --- a/src/components/Sidebar.module.scss +++ b/src/components/Sidebar.module.scss @@ -116,8 +116,8 @@ } code { - background: none !important; // stylelint-disable-line - color: inherit !important; // stylelint-disable-line + background: none; + color: inherit; } [data-deprecated='true'] code { diff --git a/src/styles/global.scss b/src/styles/global.scss index 30455358..cc372c02 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -283,11 +283,11 @@ samp { } :not(pre) > code { - background: darken($brand-white, 5%) !important; - color: $brand-grey-dark !important; + background: darken($brand-white, 5%); + color: $brand-grey-dark; display: inline-block; - padding-left: .3rem !important; - padding-right: .3rem !important; + padding-left: .3rem; + padding-right: .3rem; } pre { diff --git a/src/templates/Swagger/Toc.jsx b/src/templates/Swagger/Toc.jsx index ad47d59a..c7e24cd4 100644 --- a/src/templates/Swagger/Toc.jsx +++ b/src/templates/Swagger/Toc.jsx @@ -2,6 +2,7 @@ import React from 'react' import PropTypes from 'prop-types' import slugify from 'slugify' import Scrollspy from 'react-scrollspy' +import Scroll from '../../components/Scroll' import { cleanPathKey } from './utils' import stylesSidebar from '../../components/Sidebar.module.scss' @@ -13,9 +14,13 @@ const Toc = ({ data }) => { return (
{cleanPathKey(key)}
-
- {deprecatedUse}
+
+ {deprecatedUse}
+
{' '}
instead
{name}
- {name}
-