How to use the docz.useConfig function in docz

To help you get started, we’ve selected a few docz examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LN-Zap / zap-tutorials / src / gatsby-theme-docz / components / Logo / index.js View on Github external
export const Logo = () => {
  const config = useConfig();
  return (
    
      
        <a href="{config.website}">
          
        </a>
      

      
        
          <a href="{config.repository}">Contribute</a>
        

        
          <a href="{`${config.website}/about`}">Contact</a>
github grafana / tanka / docs / src / gatsby-theme-docz / components / Logo / index.js View on Github external
export const Logo = () =&gt; {
  const config = useConfig()
  return (
    
      
        <span>Grafana Tanka</span>
        <span>{config.description}</span>
      
    
  )
github doczjs / docz / core / docz-theme-default / src / components / ui / Editor / index.tsx View on Github external
export const Editor: React.SFC = ({
  mode,
  children,
  actions,
  onChange,
  className,
  editorClassName,
  language: defaultLanguage,
  ...props
}) =&gt; {
  const config = useConfig()
  const initialCode = useMemo(() =&gt; getChildren(children), [children])
  const [code, setCode] = useState(initialCode)
  const language = defaultLanguage || getLanguage(children)
  const options = {
    ...props,
    tabSize: 2,
    mode: language || mode,
    lineNumbers: true,
    lineWrapping: true,
    autoCloseTags: true,
    theme: 'docz-light',
  }

  const onEditorDidMount = (editor: any) =&gt; {
    if (editor) removeLastLine(editor)
  }
github doczjs / docz / core / gatsby-theme-docz / src / docz / layout.js View on Github external
export const Layout = props =&gt; {
  const config = useConfig()
  return (
    
       div': { flex: '1 1 auto' } })}&gt;
        
        {props.children}
      
    
  )
}
github ivan-dalmet / formiz / src / gatsby-theme-docz / components / Header / index.js View on Github external
export const Header = () =&gt; {
  const config = useConfig();
  const { edit = true, ...doc } = useCurrentDoc();

  return (
    <div>
      <div>
        
        
          {config.repository &amp;&amp; (
            
              <a rel="noopener noreferrer" href="{config.repository}">
                </a></div></div>
github doczjs / docz-website / src / theme / index.tsx View on Github external
const Theme: React.SFC = ({ children }) =&gt; {
  const config = useConfig()
  return (
    
      
        <main>
          
          {children}
        </main>
      
    
  )
}
github doczjs / docz / core / gatsby-theme-docz / src / index.js View on Github external
const Theme = ({ children }) =&gt; {
  const config = useConfig()
  return (
    
      
        {children}
      
    
  )
}
github angelle-sw / use-axios-client / docs / src / gatsby-theme-docz / components / Header / index.js View on Github external
export const Header = () =&gt; {
  const config = useConfig();

  return (
    <div>
      <div>
        
          
          
            <a rel="noopener noreferrer" href="{config.repository}">
              
            </a>
          </div></div>
github ivan-dalmet / formiz / src / gatsby-theme-docz / components / Logo / index.js View on Github external
export const Logo = () =&gt; {
  const config = useConfig();
  return (
    <div>
      
        <img alt="{config.title}" src="{logo}">
      
      <div>
        {config.description}
      </div>
    </div>
  );
};
github doczjs / docz / core / docz-theme-default / src / components / ui / Playground / ActionsBar.tsx View on Github external
export const ActionsBar: SFC = ({
  showEditor,
  code,
  fullscreen,
  codesandboxUrl,
  onClickRefresh,
  onClickFullscreen,
  onClickEditor,
}) =&gt; {
  const config = useConfig()
  const hasSandbox = Boolean(config.codeSandbox)

  return (
    
      
        
      
      {hasSandbox &amp;&amp; (

docz

It's has never been so easy to documents your things!

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis