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)} - +
  • ) }) @@ -32,7 +37,7 @@ const Toc = ({ data }) => { } Toc.propTypes = { - data: PropTypes.array + data: PropTypes.oneOfType([PropTypes.array, PropTypes.object]) } export default Toc diff --git a/src/templates/Typedoc/Entities.jsx b/src/templates/Typedoc/Entities.jsx index 7ece9053..d2b0da69 100644 --- a/src/templates/Typedoc/Entities.jsx +++ b/src/templates/Typedoc/Entities.jsx @@ -1,6 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' import slugify from 'slugify' +import Scroll from '../../components/Scroll' import styles from './Entities.module.scss' import { filterByKindOfProperty } from './utils' @@ -16,7 +17,11 @@ const Type = ({ type }) => { return (
    - {isInternal && {type.name}} + {isInternal && ( + + {type.name} + + )} {!isInternal && {type.name}} @@ -173,7 +178,13 @@ const PropertyWrapper = ({ property, sourceUrl, parentAnchor }) => {
    Deprecated: use{' '} - {deprecatedUse} + + {deprecatedUse} + {' '} instead
    diff --git a/src/templates/Typedoc/Entities.module.scss b/src/templates/Typedoc/Entities.module.scss index 79f1dad0..3455e215 100644 --- a/src/templates/Typedoc/Entities.module.scss +++ b/src/templates/Typedoc/Entities.module.scss @@ -34,6 +34,8 @@ code { opacity: 1; + background: none; + padding: 0; } .sourceLink { diff --git a/src/templates/Typedoc/Toc.jsx b/src/templates/Typedoc/Toc.jsx index 9fc5b92e..d66d77c4 100644 --- a/src/templates/Typedoc/Toc.jsx +++ b/src/templates/Typedoc/Toc.jsx @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import slugify from 'slugify' import Scrollspy from 'react-scrollspy' -import TocScroll from './TocScroll' +import Scroll from '../../components/Scroll' import { filterByKindOfProperty } from './utils' import stylesSidebar from '../../components/Sidebar.module.scss' @@ -19,14 +19,14 @@ export default class Toc extends PureComponent { return (
  • - {name} - +
  • ) }) @@ -43,9 +43,9 @@ export default class Toc extends PureComponent { return (
  • - + {name} - +