1

I am new to spfx and I have been trying to get the office-ui-fabric design for my elements in the spfx application. So I have started with the design of a button. I have done the following steps to get button design of ui-fabric.

  • Installed -- npm install @microsoft/sp-office-ui-fabric-core --save-dev

  • Imported import { Button } from 'office-ui-fabric-react/lib/Button'; in webpart file.

  • In render method I have a button

    <button class="{styles.button}">

But it does not apply any design to button. Am I missing anything here

1

Here is my test sample for your reference.

import {
  Dropdown,
  Button
} from 'office-ui-fabric-react/lib'
...
<Button >
              ReactButton
              </Button>

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.