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:
parent
640bbf1c74
commit
0487034edd
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue