Open ShotaroHirose59 opened 4 months ago
グローバルスタイル
通常はそれを最上位コンポーネントに追加することをお勧めします
app/layout.tsxでimportする
Clsx 状態やその他の条件に基づいて要素を条件付きでスタイル設定する必要がある場合に使用する。 Reference: https://github.com/lukeed/clsx
こんな感じ
<span className={clsx(
'inline-flex items-center rounded-full px-2 py-1 text-xs',
{
'bg-gray-100 text-gray-500': status === 'pending',
'bg-green-500 text-white': status === 'paid',
})}
>
commits
Reference: https://nextjs.org/learn/dashboard-app/css-styling
Currently, your home page doesn't have any styles. Let's look at the different ways you can style your Next.js application.
topics