Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 9e950eb

Browse files
committed
fix(docz): fix capitalization of ts interfaces
1 parent 6d74f13 commit 9e950eb

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

core/docz/src/components/Props.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as React from 'react'
22
import { SFC, ComponentType } from 'react'
33
import { get } from 'lodash/fp'
4-
import capitalize from 'capitalize'
54

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

7776
const isEnum = propName.startsWith('"') || propName === 'enum'
78-
const name = capitalize(isEnum ? 'enum' : propName)
77+
const name = isEnum ? 'enum' : propName
7978
const value = get('type.value', prop)
8079
if (!name) return null
8180

core/docz/src/utils/humanize-prop.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const getTypeStr = (type: PropType | FlowType): any => {
3737
case 'shape':
3838
const shape = type.value
3939
const rst: any = {}
40-
4140
Object.keys(shape).forEach(key => {
4241
rst[key] = getTypeStr(shape[key])
4342
})

0 commit comments

Comments
 (0)