Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

chore: add sidebar params (#3177)

ybzky260f1b620bad
diff --git a/packages/ui/src/views/components/sidebar/Sidebar.tsx b/packages/ui/src/views/components/sidebar/Sidebar.tsx
index 6d5cd263f3..1c1df99eff 100644
--- a/packages/ui/src/views/components/sidebar/Sidebar.tsx
+++ b/packages/ui/src/views/components/sidebar/Sidebar.tsx
@@ -103,7 +103,7 @@ export function Sidebar() {
</a>
</header>
- <section className={styles.sidebarBody}>{options?.children}</section>
+ <section className={styles.sidebarBody} style={options?.bodyStyle}>{options?.children}</section>
{options?.footer && <footer className={styles.sidebarFooter}>{options.footer}</footer>}
</section>
diff --git a/packages/ui/src/views/components/sidebar/interface.ts b/packages/ui/src/views/components/sidebar/interface.ts
index 9410ba290b..43b995bd35 100644
--- a/packages/ui/src/views/components/sidebar/interface.ts
+++ b/packages/ui/src/views/components/sidebar/interface.ts
@@ -14,12 +14,14 @@
* limitations under the License.
*/
+import type { CSSProperties } from 'react';
import type { ICustomLabelProps } from '../../../components/custom-label/CustomLabel';
export interface ISidebarMethodOptions {
id?: string;
header?: ICustomLabelProps;
children?: ICustomLabelProps;
+ bodyStyle?: CSSProperties;
footer?: ICustomLabelProps;
visible?: boolean;