How to use office-ui-fabric-react Dialog
Hi, I copy and pasted the sample code into my own spfx webpart:
<Dialog
isOpen={ !this.state.hideNewRequestDialog }
onDismiss={ this._closeDialog }
dialogContentProps={ {
type: DialogType.normal,
title: "All emails together",
subText: "Your Inbox has changed. No longer does it include favorites, it is a singular destination for your emails."
} }
modalProps={ {
isBlocking: true,
containerClassName: "ms-dialogMainOverride"
} }
>
I get an error saying Property 'dialogContentProps' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes
What am I doing wrong? are there other samples of this somewhere?
anybody got any ideas on this?
@russgove What version of Fabric are you using? I was able to recreate the docs site example without error
i'm using 2.34.21. that's the version that comes with spfx
Which version of Typescript are you running? There was a need to adapt fabric to work with the current version of TS some time ago. If you are on Typescript 2.4 or higher i would recommend you to try if it works with Typescript 2.2. (and then you can try to move onwards slightly).
As you are bound to specific versions of modules in spfx, you have also to be stick on the typescript version that your modules support.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Fabric React!
Hi @russgove. did this issue get fixed for you? The error makes me feel you are using a react prop that is not a prop on the Dialog React component. This could be because the documentation you read is from the Fabric site and is for a different version of Fabric React than included in your package.
thanks for following through. i lost track of the issue so closing