mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 02:18:57 +01:00
19 lines
641 B
TypeScript
19 lines
641 B
TypeScript
import { useTriliumEvents } from "../react/hooks";
|
|
import AttributeEditor from "./components/AttributeEditor";
|
|
import { TabContext } from "./ribbon-interface";
|
|
|
|
export default function OwnedAttributesTab({ note, hidden, activate, ntxId, ...restProps }: TabContext) {
|
|
useTriliumEvents([ "addNewLabel", "addNewRelation" ], ({ ntxId: eventNtxId }) => {
|
|
if (ntxId === eventNtxId) {
|
|
activate();
|
|
}
|
|
});
|
|
|
|
return (
|
|
<div className="attribute-list">
|
|
{ note && (
|
|
<AttributeEditor ntxId={ntxId} note={note} {...restProps} hidden={hidden} />
|
|
)}
|
|
</div>
|
|
)
|
|
} |