mirror of
https://github.com/devonthesofa/obsidian-note-status.git
synced 2026-07-22 05:45:04 +00:00
30 lines
761 B
TypeScript
30 lines
761 B
TypeScript
import React from "react";
|
|
import { NoteStatus } from "@/types/noteStatus";
|
|
import { StatusDisplay } from "../atoms/StatusDisplay";
|
|
import { SettingItem } from "../SettingsUI/SettingItem";
|
|
|
|
interface Props {
|
|
currentStatuses: NoteStatus[];
|
|
onRemoveStatus: (status: NoteStatus) => void;
|
|
}
|
|
|
|
export const CurrentStatusChips: React.FC<Props> = ({
|
|
currentStatuses,
|
|
onRemoveStatus,
|
|
}) => {
|
|
return (
|
|
<SettingItem name="Current statuses" vertical>
|
|
<div className="note-status-chips">
|
|
{currentStatuses.map((status) => (
|
|
<StatusDisplay
|
|
key={`${status.templateId || "custom"}:${status.name}`}
|
|
status={status}
|
|
variant="chip"
|
|
removable
|
|
onRemove={() => onRemoveStatus(status)}
|
|
/>
|
|
))}
|
|
</div>
|
|
</SettingItem>
|
|
);
|
|
};
|