Skip to content

Commit

Permalink
Refactor #4196 - For SplitterPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Jul 25, 2023
1 parent 584ca93 commit 77934bf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions components/lib/splitterpanel/SplitterPanel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export declare type SplitterPanelPassThroughOptionType = SplitterPanelPassThroug
export interface SplitterPanelPassThroughMethodOptions {
instance: any;
props: SplitterPanelProps;
context: SplitterPanelContext;
}

/**
Expand All @@ -44,6 +45,16 @@ export interface SplitterPanelPassThroughAttributes {
[key: string]: any;
}

/**
* Defines options in SplitterPanel component.
*/
export interface SplitterPanelContext {
/**
* Current nested state of the panel.
*/
nested?: boolean;
}

/**
* Defines valid properties in SplitterPanel component.
*/
Expand Down
7 changes: 7 additions & 0 deletions components/lib/splitterpanel/SplitterPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ export default {
return this.$slots.default().some((child) => {
return child.type.name === 'Splitter';
});
},
getPTOptions() {
return {
context: {
nested: this.isNested
}
};
}
}
};
Expand Down

0 comments on commit 77934bf

Please sign in to comment.