react
react copied to clipboard
Bug: Component Style Not Applied Correctly
I have a component with "margin-left": "10rem" . It is showing the margin correctly in the Form builder preview. When I render the same form using formio/react, it is not applying the margin. In browser console it shows
element.style {
}
In the network tab I can see
"style": {
"margin-left": "10rem"
}
Am I missing something ?
I am using "@formio/react": "^5.3.0" and in the index I have added
<link rel='stylesheet' href='https://unpkg.com/formiojs@latest/dist/formio.full.min.css'>
<link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css'>
<link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'>
Where are you adding the style param? In the form builder, or?