mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
enhance(phone/settings): Added labels to settings and misc cleanup
This change alters the default localStorage schema, please clear your localStorage cache for testing
This commit is contained in:
1 parent
5969d33dc3
commit
64c4e0ec16
11 files changed
+290
-210
No files matched your search
@@ -12,6 +12,20 @@ export const MapStringOptions = (current, onClick) => (string) => {
|
||||
};
|
||||
};
|
||||
|
||||
export interface SettingOption {
|
||||
label: string;
|
||||
value: string | number;
|
||||
}
|
||||
|
||||
export const MapSettingItem = (current: SettingOption, onClick: Function) => (
|
||||
item: SettingOption,
|
||||
) => ({
|
||||
selected: current.value === item.value,
|
||||
onClick: () => onClick(item),
|
||||
key: item.value,
|
||||
label: item.label,
|
||||
});
|
||||
|
||||
export const useContextMenu = (_options?): UseContextMenu => {
|
||||
const [open, setOpen] = useState(false);
|
||||
const [options, setOptions] = useState(_options || []);
|
||||
|
||||
Reference in new issue
Block a user