📜  样式化组件 tw - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:25.798000             🧑  作者: Mango

代码示例2
const Button = tw.div`
    ${(p) => (p.$primary ? "bg-indigo-600" : "bg-indigo-300")}

    flex
    inline-flex
    items-center
    border
    border-transparent
    text-xs
    font-medium
    rounded
    shadow-sm
    text-white

    hover:bg-indigo-700
    focus:outline-none
`