Skip to content

Commit

Permalink
fix(docz): fix capitalization of ts interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
rakannimer committed Feb 6, 2020
1 parent 6d74f13 commit 9e950eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions core/docz/src/components/Props.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as React from 'react'
import { SFC, ComponentType } from 'react'
import { get } from 'lodash/fp'
import capitalize from 'capitalize'

import { useComponents, useComponentProps } from '../hooks'
import { humanize } from '../utils/humanize-prop'
Expand Down Expand Up @@ -75,7 +74,7 @@ export const getPropType = (prop: Prop) => {
if (!propName) return null

const isEnum = propName.startsWith('"') || propName === 'enum'
const name = capitalize(isEnum ? 'enum' : propName)
const name = isEnum ? 'enum' : propName
const value = get('type.value', prop)
if (!name) return null

Expand Down
1 change: 0 additions & 1 deletion core/docz/src/utils/humanize-prop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const getTypeStr = (type: PropType | FlowType): any => {
case 'shape':
const shape = type.value
const rst: any = {}

Object.keys(shape).forEach(key => {
rst[key] = getTypeStr(shape[key])
})
Expand Down

0 comments on commit 9e950eb

Please sign in to comment.