Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(delete): borderless table
Elian Doranbd0117c52fbf
diff --git a/apps/client/src/widgets/dialogs/delete_notes.tsx b/apps/client/src/widgets/dialogs/delete_notes.tsxindex 9d6f717d0f..5bc0c8b528 100644--- a/apps/client/src/widgets/dialogs/delete_notes.tsx+++ b/apps/client/src/widgets/dialogs/delete_notes.tsx@@ -216,8 +216,8 @@ function BrokenRelations({ brokenRelations }: { brokenRelations: DeleteNotesPrevreturn (<Card heading={t("delete_notes.broken_relations_to_be_deleted", { relationCount: brokenRelations.length })}>- <CardSection>- <div style={{ overflow: "auto" }}>+ <CardSection noPadding>+ <div style={{ overflowX: "auto" }}><table className="table table-striped"><thead><tr>diff --git a/apps/client/src/widgets/react/Card.css b/apps/client/src/widgets/react/Card.cssindex 0aecb56dbd..1e4075a7af 100644--- a/apps/client/src/widgets/react/Card.css+++ b/apps/client/src/widgets/react/Card.css@@ -35,6 +35,14 @@flex-direction: column;gap: var(--card-section-gap);+ .tn-card-section.tn-no-padding {+ padding: 0;++ & .table {+ margin-bottom: 0;+ }+ }+.tn-card-section {&:first-of-type {border-top-left-radius: var(--card-border-radius);diff --git a/apps/client/src/widgets/react/Card.tsx b/apps/client/src/widgets/react/Card.tsxindex 1abd259f0c..d16e1f83e4 100644--- a/apps/client/src/widgets/react/Card.tsx+++ b/apps/client/src/widgets/react/Card.tsx@@ -50,6 +50,7 @@ export interface CardSectionProps {subSectionsVisible?: boolean;highlightOnHover?: boolean;onAction?: () => void;+ noPadding?: boolean;}interface CardSectionContextType {@@ -65,7 +66,8 @@ export function CardSection(props: {children: ComponentChildren} & CardSectionPrreturn <><section className={clsx("tn-card-section", props.className, {"tn-card-section-nested": nestingLevel > 0,- "tn-card-highlight-on-hover": props.highlightOnHover || props.onAction+ "tn-card-highlight-on-hover": props.highlightOnHover || props.onAction,+ "tn-no-padding": props.noPadding})}style={{"--tn-card-section-nesting-level": (nestingLevel) ? nestingLevel : null}}onClick={props.onAction}>