19 lines
678 B
TypeScript
19 lines
678 B
TypeScript
|
|
import { useConfig } from '@/components/ui/ConfigProvider'
|
|||
|
|
|
|||
|
|
// Sayfa başlığındaki görünüm/mod rozeti. Badge'in .badge sınıfı katmansız CSS'te sabit kırmızıdır
|
|||
|
|
// (bildirim sayacı) ve utility sınıfları ezemez; renkler tema renginden gelir, sınıflar
|
|||
|
|
// tailwind/index.css'teki @source inline listesinde üretilir.
|
|||
|
|
const PageModeBadge = ({ content }: { content: string }) => {
|
|||
|
|
const { themeColor } = useConfig()
|
|||
|
|
|
|||
|
|
return (
|
|||
|
|
<span
|
|||
|
|
className={`rounded-full px-2 py-0.5 text-xs bg-${themeColor}-100 text-${themeColor}-700 dark:bg-${themeColor}-500/20 dark:text-${themeColor}-300`}
|
|||
|
|
>
|
|||
|
|
{content}
|
|||
|
|
</span>
|
|||
|
|
)
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
export default PageModeBadge
|