+ 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?

12th Feb 2020, 8:59 AM
Ahmad
Ahmad - avatar
1 ответ
+ 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'}
24th Feb 2020, 11:56 PM
Tashi N
Tashi N - avatar