Skip to content

Commit acbbdd3

Browse files
authored
Merge pull request #65 from sean1292/testing
Made typing definitions for Props clearer
2 parents 3cdb206 + dded573 commit acbbdd3

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/components/bottom/Props.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ const availablePropTypes = {
5151
boolean: 'BOOL',
5252
function: 'FUNC',
5353
any: 'ANY',
54-
tuple: 'TUP',
55-
enum: 'ENUM'
54+
tuple: 'TUP'
5655
};
5756

5857
// generates the various options for the prop type selection

src/utils/componentRender.util.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,8 @@ const componentRender = (
4141
return 'boolean';
4242
case 'function':
4343
return '() => any';
44-
// case 'symbol':
45-
// return 'string';
46-
case 'node':
47-
return 'string';
48-
case 'element':
49-
return 'string';
5044
case 'tuple':
5145
return '[any]';
52-
case 'enum':
53-
return '{}';
5446
case 'any':
5547
return 'any';
5648
default:
@@ -185,7 +177,7 @@ const componentRender = (
185177
.join('\n')}
186178
187179
188-
180+
/* Replace "any" with stricter types to reflect your usage*/
189181
interface Props {
190182
${props.map(prop => `${prop.key}: ${typeSwitcher(prop.type)};\n`)}
191183
};

0 commit comments

Comments
 (0)