Test
должен использовать className
реквизит, который генерируется библиотекой css -in- js (эмоция в данном случае):
function Test({ className }) {
return (
<div
className={className}
css={css`
height: 100px;
width: 100px;
background-color: aqua;
`}
>
Text
</div>
);
}
Следовательно:
// Will use the styling defined in `Test` component (default)
<Text/>
// Will use the defined styling and override the default when possible,
// or add additional styling.
// i.e using background-color will override it
// using background-border will *add* a style
<Text css={...}/>
// Same as above, usually used with 3rd party css.
<Text className="someOtherCss" />