@emotion/react
とmui
を使用しています。import { SerializedStyles } from '@emotion/react' interface Props { className?: string css?: SerializedStyles } export function Child({ className }: Props) { return ( <div className={className}> </div> ) }
下記のケースでは、some-class
とemotion
で作成されたクラス名が、Child
の<div className={className}>
で適用される。
<Child className="some-class" css={css` color: red; `} />