diff --git a/packages/sui-studio/src/components/documentation/Api.js b/packages/sui-studio/src/components/documentation/Api.js index 857a7ddd6..5174ee7fa 100644 --- a/packages/sui-studio/src/components/documentation/Api.js +++ b/packages/sui-studio/src/components/documentation/Api.js @@ -40,7 +40,7 @@ export default function Api({params}) { return (
-

{propName}

+

{propName}

required @@ -69,8 +69,8 @@ export default function Api({params}) { const {props} = componentDoc return ( -

{componentDoc.displayName}

-

Props

+

{componentDoc.displayName}

+
Props
{renderPropsApi({props})}
) diff --git a/packages/sui-studio/src/components/documentation/_style.scss b/packages/sui-studio/src/components/documentation/_style.scss index 9de3bc828..acf599e9e 100644 --- a/packages/sui-studio/src/components/documentation/_style.scss +++ b/packages/sui-studio/src/components/documentation/_style.scss @@ -1,4 +1,26 @@ .sui-StudioProps { + &-h1, + &-h2 { + font-weight: 400; + line-height: 1.25; + padding-bottom: 0.4em; + } + &-h1 { + font-size: 2.25em; + border-bottom: 1px solid #eaecef; + } + &-h2 { + font-size: 0.875em; + font-weight: 700; + margin-top: 56px; + text-transform: uppercase; + } + &-blockquote { + border-left: 0.25em solid #dfe2e5; + color: #6a737d; + padding: 0 1em; + margin: 0; + } &-prop { padding: 0 16px 24px 0; } diff --git a/packages/sui-studio/src/components/layout/index.js b/packages/sui-studio/src/components/layout/index.js index 0acc57f25..809db869f 100644 --- a/packages/sui-studio/src/components/layout/index.js +++ b/packages/sui-studio/src/components/layout/index.js @@ -1,4 +1,4 @@ -import React, {useEffect, useState} from 'react' +import React, {useEffect, useState, useRef} from 'react' import cx from 'classnames' import PropTypes from 'prop-types' @@ -9,12 +9,14 @@ import Markdown from '../documentation/Markdown.js' import {iconMenu} from '../icons/index.js' import Navigation from '../navigation/index.js' import {fetchComponentsReadme} from '../tryRequire.js' +import {getStudioName} from '../utils.js' import Logo from './Logo.js' export default function Layout({children}) { const [readme, setReadme] = useState(null) const [menuIsHidden, setMenuIsHidden] = useState(false) const [search, setSearch] = useState('') + const {current: studioName} = useRef(getStudioName()) const handleChange = e => { setSearch(e.target.value) @@ -54,7 +56,7 @@ export default function Layout({children}) { -

SUI Components

+ {studioName &&

{studioName}

}
-
setMenuIsHidden(true)}> - {' '} -
+
setMenuIsHidden(true)} /> {children !== null ? children : renderReadme()}