Skip to content

Commit

Permalink
fix(docz): docs categories for themes
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed May 6, 2018
1 parent 252b2af commit 687720c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/docz/src/Docs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { DocObj } from './Doc'
import { Doc, DocObj } from './Doc'

export const isFn = (value: any): boolean => typeof value === 'function'
export const docsContext = React.createContext([] as DocObj[])
Expand All @@ -23,9 +23,7 @@ export const Docs: React.SFC<DocsProps> = ({ children }) => (
)
}

console.log(docs)

return children({ docs, categories: [] })
return children({ docs, categories: Doc.categoriesFromDocs(docs) })
}}
</docsContext.Consumer>
)

0 comments on commit 687720c

Please sign in to comment.