feat: add title-case package and use it for label formatting in GroupedList component
Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -125,6 +125,7 @@
|
||||
"react-native-webview": "13.15.0",
|
||||
"shiki": "3.7.0",
|
||||
"tailwindcss": "3.4.17",
|
||||
"title-case": "4.3.2",
|
||||
"use-sync-external-store": "1.5.0",
|
||||
"usehooks-ts": "3.1.1",
|
||||
"zeego": "3.0.6",
|
||||
|
||||
@@ -7,6 +7,7 @@ import type { PressableProps, ViewProps } from "react-native"
|
||||
import { Pressable, StyleSheet, Text, TouchableOpacity, View } from "react-native"
|
||||
import Animated, { FadeIn, FadeOut } from "react-native-reanimated"
|
||||
import type { SFSymbol } from "sf-symbols-typescript"
|
||||
import { titleCase } from "title-case"
|
||||
|
||||
import { CheckFilledIcon } from "@/src/icons/check_filled"
|
||||
import { MingcuteRightLine } from "@/src/icons/mingcute_right_line"
|
||||
@@ -189,7 +190,6 @@ export const GroupedInsetListNavigationLinkIcon: FC<
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export const GroupedInsetListCell: FC<
|
||||
{
|
||||
label: string
|
||||
@@ -208,7 +208,7 @@ export const GroupedInsetListCell: FC<
|
||||
<View className={cn("flex-1 gap-1", leftClassName)}>
|
||||
<View className="flex-row items-center gap-2">
|
||||
{!!icon && <SymbolView name={icon} size={20} tintColor="black" />}
|
||||
<Text className="text-label">{label}</Text>
|
||||
<Text className="text-label">{titleCase(label)}</Text>
|
||||
</View>
|
||||
{!!description && (
|
||||
<Text className="text-secondary-label text-sm leading-tight">{description}</Text>
|
||||
|
||||
Generated
+3
@@ -1064,6 +1064,9 @@ importers:
|
||||
tailwindcss:
|
||||
specifier: 3.4.17
|
||||
version: 3.4.17(ts-node@10.9.2(@types/node@24.0.3)(typescript@5.8.3))
|
||||
title-case:
|
||||
specifier: 4.3.2
|
||||
version: 4.3.2
|
||||
use-sync-external-store:
|
||||
specifier: 1.5.0
|
||||
version: 1.5.0(react@19.0.0)
|
||||
|
||||
Reference in New Issue
Block a user