Skip to content

Commit 2541986

Browse files
authored
Fix the problem with export/import of the control
The control "ContentTypePicker" can't be used with the preview configuration, it returns an error `(alias) class ContentTypePicker import ContentTypePicker JSX element class does not support attributes because it does not have a 'props' property.ts(2607)` `'ContentTypePicker' cannot be used as a JSX component. Its instance type 'ContentTypePicker' is not a valid JSX element. Type 'ContentTypePicker' is missing the following properties from type 'ElementClass': context, setState, forceUpdate, props, and 2 more.ts(2786)` [For more details : What is the difference between import * as react from 'react' vs import react from 'react'](https://stackoverflow.com/questions/54585763/what-is-the-difference-between-import-as-react-from-react-vs-import-react-fr)
1 parent b1f6d35 commit 2541986

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/controls/contentTypePicker/ContentTypePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as telemetry from '../../common/telemetry';
2-
import React from 'react';
2+
import * as React from 'react';
33
import { IContentTypePickerProps, IContentTypePickerState } from './IContentTypePicker';
44
import { ISPService } from '../../services/ISPService';
55
import { SPServiceFactory } from '../../services/SPServiceFactory';

0 commit comments

Comments
 (0)