mirror of
https://github.com/ajnart/homarr.git
synced 2026-03-06 12:21:06 +01:00
* feat: update prettier configuration for print width * chore: apply code formatting to entire repository * fix: remove build files * fix: format issue --------- Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
31 lines
786 B
TypeScript
31 lines
786 B
TypeScript
"use client";
|
|
|
|
import { Text } from "@mantine/core";
|
|
|
|
import type { SelectWithCustomItemsProps } from "./select-with-custom-items";
|
|
import { SelectWithCustomItems } from "./select-with-custom-items";
|
|
|
|
export interface SelectItemWithDescription {
|
|
value: string;
|
|
label: string;
|
|
description: string;
|
|
}
|
|
type Props = SelectWithCustomItemsProps<SelectItemWithDescription>;
|
|
|
|
export const SelectWithDescription = (props: Props) => {
|
|
return <SelectWithCustomItems<SelectItemWithDescription> {...props} SelectOption={SelectOption} />;
|
|
};
|
|
|
|
const SelectOption = ({ label, description }: SelectItemWithDescription) => {
|
|
return (
|
|
<div>
|
|
<Text fz="sm" fw={500}>
|
|
{label}
|
|
</Text>
|
|
<Text fz="xs" opacity={0.6}>
|
|
{description}
|
|
</Text>
|
|
</div>
|
|
);
|
|
};
|