jquery-application-toastr, no icons if I use CSS iconClasses in Online
See original GitHub issuejquery-application-toastr
Authors
Chris Kent (thechriskent.com, @thechriskent)
Expected or Desired Behavior
Greetings! I adopted code from this sample to work in webpart https://github.com/SharePoint/sp-dev-fx-extensions/tree/master/samples/jquery-application-toastr
and if I use it in on-premise 2019 - it works like a charm, and icons are displayed like in this picture:
(my solution was “On-premise 2019 and SharePoint Online”) Expected behavior is to see same icons in SharePoint Online
Observed Behavior
But there are no icons in O365…
Steps to Reproduce
I tried “On-prem 2019 and SharePoint Online”, and “SharePoint Online only” webparts, behavior is same… - there are no icons visible in SharePoint Online.
I also tried to google and do something like this, but no luck:
import { initializeIcons } from 'office-ui-fabric-react/lib/Icons';
// import { initializeIcons } from '@uifabric/icons';
// ..
// then in function:
initializeIcons();
Also, noticed that if I comment this section, I see different styles and icons:
But when uncommented - colors applied but no icons visible…
Environment Details (Development & Target environment)
- OS: [Windows Server 2019 ]
- Target Environment: [SharePoint Server 2019 | SharePoint Online]
- Framework: [Node.js v10]
- Browser(s): [Chrome]
- Tooling: [VS Code]
versions:
Best regards, Gennady
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top GitHub Comments
Well, finally I haven’t found the way to make Office UI icons visible, so I got rid of them and replaced them with base64.
Also added global styles (I am newbie, not sure it is best-practice, but this dirty workaround works).
So toastr options now looks like:
and in SCSS file:
And now it works:
I used this tool to convert icons to base64, thank to @joshmcrty
okay i got it
but the missed icons seems to be a poroblem in this solution.
maybe @PopWarner or @thechriskent have a solutiosn for this or an update for the sample?