Antd: I'm trying to change the default styling of Antd's checkboxes using styled components to make the checkbox larger and change the color to black - reactjs

I have an Antd checkbox that I'm trying to make larger, alter the thickness of the box itself and change the color to black but every style I apply creates a second square that sits over the checkbox and doesn't change the checkbox itself. Does anyone have any ideas on how to do this?

Figured this out by using &&&{border: 2px solid ${({ theme }) => theme.colors.black} the triple ampersand allows you to add more specificity when working with mixed styled components like mine.

Related

How to limit the height of MUI Autocomplete input box

I am having trouble in limiting the height of MUI Autocomplete component. When I select the value from the list it automatically add empty space or row at the bottom of input which I do not want.
Below is my example.
https://codesandbox.io/s/mui-5-forked-n8nc6i?file=/src/App.js
screenshot
If you want to bypass the default css style from MUI, then you can use inside your css the following:
.MuiAutocomplete-inputRoot {
flex-wrap: nowrap !important;
}
example

react-virtualized - Is there a way to add hover style on rows of the Table

When we user hovers on the row, the background color of the respective row should change to #e7e7e7.
Tried to add row effect through JSS, but this allows to have row effect on the cells instead of rows.
JSS approach
I tried to add hover effect using the props rowStyle, but this didn't work for me.
Using prop rowStyle
I'm using styled-components in my project and this is how you can style the row using it.
const StyledTable = styled(Table)`
.ReactVirtualized__Table__row {
:hover {
background: red;
}
}
`;
I think you're using the wrong selector.
What styling lib are you using?

Is there a way to target some reac-bootstrap component css?

Is there any way to target some components from react-bootstrap in CSS. For my application, I'm using Modals from react-bootstrap and I need to change some style on all of them and it will be annoying if I need to change every single one individually.
Yes, it is possible, however you will need to inspect the Modal using ChromeDevTools or the like and see what classes are applied to the Modal when it is displayed. For example, when I inspected the Modal from react-bootstrap, I noticed the styles applied to the heading were given the className of "modal-header". So I created a Modal.css file and added the following code to it:
.modal-header {
background-color: red;
}
Then, I imported "./Modal.css" into the Modal.js file or wherever you've defined or using your Modal. Finally, when I opened the Modal, the heading had a background of red color so to speak.
Please note that it can be a little difficult to override bootstrap styles sometimes.

How to change the border Bottom of Material-UI <Autocomplete/> if is disable

I would like to change the appearance of the autocomplete component provided by MaterialUi when it is disabled.
They propose, I imagine, borderBottom: dotted. I would like it to look like the select, also disabled, that I show in the following example.
https://codesandbox.io/s/xenodochial-shtern-7icn9?file=/src/playground.js
I don't know how is the correct way to overwrite the property proposed by MaterialUi.
Any ideas will be welcome.
Add in your main css (for overwrite a rule it must be imported after mui):
.MuiInput-underline.Mui-disabled:before {
border-bottom: 0;
}

How to adjust colors in angular material default themes

My users are complaining that the change in color for md-buttons on focus is too subtle.
What is the right way to make an adjustment to this for the default color palettes?
Append: I am looking on how to adjust the button styling when the button has focus, not looking for how to create my own theme.
Also, I am using Angular-Material 1, NOT 2
OK, for anyone else looking for this, I found the answer in angular-material.modules.closure.button and angular-material.modules.js.button
.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover {
background-color: '{{primary-600}}'; }
.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused {
background-color: '{{primary-600}}'; }
This tells me what I needed, which is that focused buttons get primary-600.
NOW I can customized the theme palletes as recommended in the first comment

Resources