feat(select): add itemClassName prop for customizable item styling (#2793)

* feat(select): add itemClassName prop for customizable item styling

* update

* udpate
This commit is contained in:
Konv Suu 2025-02-18 13:42:17 +08:00 committed by GitHub
parent 640bbf1c74
commit 0487034edd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 2 deletions

View File

@ -11,7 +11,7 @@ import {
import { ResponsiveSelect } from "@follow/components/ui/select/responsive.js"
import { useIsDark, useThemeAtomValue } from "@follow/hooks"
import { IN_ELECTRON } from "@follow/shared/constants"
import { getOS } from "@follow/utils/utils"
import { capitalizeFirstLetter, getOS } from "@follow/utils/utils"
import dayjs from "dayjs"
import { useForceUpdate } from "framer-motion"
import { lazy, Suspense, useEffect, useRef, useState } from "react"
@ -153,6 +153,7 @@ export const SettingAppearance = () => {
const ShikiTheme = () => {
const { t } = useTranslation("settings")
const isMobile = useMobile()
const isDark = useIsDark()
const codeHighlightThemeLight = useUISettingKey("codeHighlightThemeLight")
const codeHighlightThemeDark = useUISettingKey("codeHighlightThemeDark")
@ -174,7 +175,13 @@ const ShikiTheme = () => {
}
}}
triggerClassName="w-48"
renderItem={(item) => <span className="capitalize">{item.label}</span>}
renderItem={(item) =>
isMobile ? (
capitalizeFirstLetter(item.label)
) : (
<span className="capitalize">{item.label}</span>
)
}
size="sm"
/>
</div>