How do you style a office fabric react component? - reactjs

I can't figure out how to style the fabric ui component. I just want to change the background of the nav bar to be black with white phone instead of white background and black font. However, this seems to be really difficult with the current component.
There is virtually no documenation on how to style either.
https://dev.office.com/fabric#/components/nav
Thanks,
Derek

css inline not working?
Example:
style={{backgroundColor:'black', color:'white'}}
Regards.

Related

Change dialog button color (Next/Back) : Intro JS React

I am using a React wrapper for intro js,
and I am trying to change the default background color for dialog buttons.
Here's a codesandbox given in the documentation
I want to change the background color of the Next button here
I have been trying to look this up all over the web but I cannot find a solution.
Any help would be greatly appreciated.
I had to inspect the element and override the CSS to make it work.
Then the color got changed correctly
Reference - https://stackoverflow.com/a/67566764/9977815

MUI DatePicker - How can I change YearPicker styling

I was just trying out DesktopDatePicker component and experimenting a bit with it's costumization and noticed I couldn't find any information on how to style YearPicker from DesktopDatePicker.
To costumize PickersDay, for instance, I can use renderDay prop and render a StyledPickersDay.
However for YearPicker, I don't see a renderYear or anything similar :/
enter image description here
For context, I wanted to change the color from blue to orange
Is there a different way to do this or it just hasn't been implemented yet?
You can edit the CSS in the YearPicker component: https://mui.com/x/api/date-pickers/year-picker/#css

I need to edit the z-index overlay in woo slider

I'm using woocommerce storefront theme and want to edit the woo-slider overlay to a gradient instead of a black box. I also want to style the text overlay and add some padding. Does anyone know how I can do this?
Here's a link to the page in question: https://olivetreemortuary.biz

How to change Codename One Chart background color

am trying to change the background of Chart Renderer but it's not working for all the chart types I have.
used this code
renderer.setApplyBackgroundColor(true);
renderer.setBackgroundColor(GlobalVal.CHART_BG_COLOR);
and it worked for DoughnutChart but did not work for BarChart & CubicLineChart, shows black.
Is there any other method I should call?
You can try putting it into its own container and style the container with a UIID. Chart styling seems pretty tricky.
Have figured it out
renderer.setMarginsColor(GlobalVal.CHART_BG_COLOR);
did the job.

CodeNameOne: Custom dialog theme issue

How can I create a theme for a dialog box?
I was trying to change the border style of the dialog box but the border style applies 2 times for an inner element and for an outer element. I was expected that the border style applies only to the inner element.
To be clearer, as I cannot add image to my post, it seems that the dialog does not consist only from the center box which is showed while dialog is active. The dialog UI consists from a “background form” which usually is transparent and from a container which overlay over the background form. The last mentioned container contains de graphic representation of the “dialog box”.
My issue is that I can not apply my style only to the container which contains the dialog box but the style applies also to the background form.
How can I apply the border style only to the dialog box container element?
Any additional tips will be highly appreciated.
Thanks.
How are you applying the style? Are you using the theme to apply a style to the Dialog UIID as explained here.
Using setStyle or getStyle on a dialog component would be problematic and would not result in proper styling (you might get away with doing it on getDialogComponent but you should work with the theme).
Notice that to style a dialog you should use Dialog, DialogTitle & DialogBody UIID's and quite a few theme constants.
Thanks Shai,
is clear now.
I’m doing a custom dialog starting from the BlankDialog element provided in designer.
Because I started from BlankDialog I thought that overriding only UIID theme is enough.
I understood the BlankDialog structure wrongly thinking that is a simple empty form because is named "Blank…"
Is clear now that for every new UI object added, I should check if it has any other UI child to be customized together with the parent.
Thanks again.

Resources