When working with React, my components adhere to a specific file structure schema:
- componentName
|- componentName.tsx
|- componentName.scss
Some of these components are wrapped with a <React.Fragment>
, like this:
render() {
return (
<React.Fragment>
<ChildA />
<ChildB />
<ChildC />
</React.Fragment>
);
}
Is there a way to style this element in CSS without the use of an id
or a className
? For example:
React.Fragment {
padding-top: 30px;
}
Since adding an id
or a className
is not possible, any suggestions on how to target this element?