Skip to content

Commit 6589a60

Browse files
authored
feat: add mainClass to DBPage (#3941)
1 parent b4eb8a5 commit 6589a60

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/components/src/components/page/model.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ export type DBPageDefaultProps = {
2626
*/
2727
header?: any;
2828

29+
/**
30+
* Adds `class` to `<main>` element
31+
*/
32+
mainClass?: string;
33+
2934
/**
3035
* The variant=fixed uses flex-box to make header and footer static
3136
*/

packages/components/src/components/page/page.lite.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ export default function DBPage(props: DBPageProps) {
6868
data-fade-in={props.fadeIn}
6969
data-fonts-loaded={getBooleanAsString(state.fontsLoaded)}>
7070
<Slot name="header" />
71-
<main class="db-main">{props.children}</main>
71+
<main class={cls('db-main', props.mainClass)}>
72+
{props.children}
73+
</main>
7274
<Slot name="footer" />
7375
</div>
7476
);

0 commit comments

Comments
 (0)