Utilisation de classes de vent arrière conditionnel pour Twin.macro

import tw from 'twin.macro'

const Component = ({ hasBg }) => (
  <div
    css={[
      tw`flex w-full`, // Add base styles first
      hasBg && tw`bg-black`, // Then add conditional styles
    ]}
  >
    <div tw="w-1/2" />
    <div tw="w-1/2" />
  </div>
)
Yucky Yak