+ 2
How to style a component without wrapping it inside a div in react js? How to pass a prop and style that component based on the
const Compo1: React.FC<{}> = () => ( <App1 loading={true} /> ); export const loading = () => ( <Org1 isOpen={true} loading={true}> <LoadingC/> </Org1> ); How can i give this component a paddig of py-1?
1 Respuesta
+ 1
The probably most common ways to style a component are
- import a css file
- pass the value to the style property
style={padding: '1px'}