mirror of
https://github.com/mathuo/dockview
synced 2025-09-28 12:07:51 +00:00
feat: rename theme property
This commit is contained in:
parent
082b811d20
commit
1030bdb778
@ -59,7 +59,7 @@ export class ContentContainer
|
|||||||
|
|
||||||
this.dropTarget = new Droptarget(this.element, {
|
this.dropTarget = new Droptarget(this.element, {
|
||||||
getOverlayOutline: () => {
|
getOverlayOutline: () => {
|
||||||
return accessor.options.theme?.includeHeaderWhenHoverOverContent
|
return accessor.options.theme?.dndPanelOverlay === 'group'
|
||||||
? this.element.parentElement
|
? this.element.parentElement
|
||||||
: null;
|
: null;
|
||||||
},
|
},
|
||||||
|
@ -1,9 +1,25 @@
|
|||||||
export interface DockviewTheme {
|
export interface DockviewTheme {
|
||||||
|
/**
|
||||||
|
* The name of the theme
|
||||||
|
*/
|
||||||
name: string;
|
name: string;
|
||||||
|
/**
|
||||||
|
* The class name to apply to the theme containing the CSS variables settings.
|
||||||
|
*/
|
||||||
className: string;
|
className: string;
|
||||||
|
/**
|
||||||
|
* The gap between the groups
|
||||||
|
*/
|
||||||
gap?: number;
|
gap?: number;
|
||||||
|
/**
|
||||||
|
* The mouting position of the overlay shown when dragging a panel. `absolute`
|
||||||
|
* will mount the overlay to root of the dockview component whereas `relative` will mount the overlay to the group container.
|
||||||
|
*/
|
||||||
dndOverlayMounting?: 'absolute' | 'relative';
|
dndOverlayMounting?: 'absolute' | 'relative';
|
||||||
includeHeaderWhenHoverOverContent?: boolean;
|
/**
|
||||||
|
* When dragging a panel, the overlay can either encompass the panel contents or the entire group including the tab header space.
|
||||||
|
*/
|
||||||
|
dndPanelOverlay?: 'content' | 'group';
|
||||||
}
|
}
|
||||||
|
|
||||||
export const themeDark: DockviewTheme = {
|
export const themeDark: DockviewTheme = {
|
||||||
@ -42,7 +58,7 @@ export const themeAbyssSpaced: DockviewTheme = {
|
|||||||
className: 'dockview-theme-abyss-spaced',
|
className: 'dockview-theme-abyss-spaced',
|
||||||
gap: 10,
|
gap: 10,
|
||||||
dndOverlayMounting: 'absolute',
|
dndOverlayMounting: 'absolute',
|
||||||
includeHeaderWhenHoverOverContent: true,
|
dndPanelOverlay: 'group',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const themeLightSpaced: DockviewTheme = {
|
export const themeLightSpaced: DockviewTheme = {
|
||||||
@ -50,5 +66,5 @@ export const themeLightSpaced: DockviewTheme = {
|
|||||||
className: 'dockview-theme-light-spaced',
|
className: 'dockview-theme-light-spaced',
|
||||||
gap: 10,
|
gap: 10,
|
||||||
dndOverlayMounting: 'absolute',
|
dndOverlayMounting: 'absolute',
|
||||||
includeHeaderWhenHoverOverContent: true,
|
dndPanelOverlay: 'group',
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user