make name color editor accept a title and description

This commit is contained in:
Rosy.iso committed 2026-03-10 11:55:32 +01:00
1 parent 644a73c458
commit 814030654b
2 files changed
+6 -5

No files matched your search

@@ -5,11 +5,13 @@ import { SettingTile } from '$components/setting-tile';
import { HexColorPickerPopOut } from '$components/HexColorPickerPopOut';
type NameColorEditorProps = {
title: string;
description?: string;
current?: string;
onSave: (color: string | null) => void;
};
export function NameColorEditor({ current, onSave }: NameColorEditorProps) {
export function NameColorEditor({ title, description, current, onSave }: NameColorEditorProps) {
const stripQuotes = (str?: string) => {
if (!str) return '';
// to solve the silly tuwunel
@@ -48,10 +50,7 @@ export function NameColorEditor({ current, onSave }: NameColorEditorProps) {
return (
<Box direction="Column" gap="100">
<SettingTile
title="Global Name Color"
description="Custom name color everywhere names have color!"
/>
<SettingTile title={title} description={description} />
<Box
alignItems="Center"
justifyContent="SpaceBetween"
@@ -538,6 +538,8 @@ function ProfileExtended({ profile, userId }: ProfileProps) {
gap="400"
>
<NameColorEditor
title="Global Name Color"
description="Custom name color everywhere names have color!"
current={profile.nameColor || profile.extended?.['moe.sable.app.name_color']}
onSave={(color) => handleSaveField('moe.sable.app.name_color', color)}
/>