Skip to content

Commit 211cf1d

Browse files
feat(DBHeader): introduce new property closeButtonText (#5401)
* feat(DBHeader): introduce new property `closeDrawerLabel` This label allows to set the label for the close button when the `DBDrawer` is opened. It passes the prop value to the inner `DBDrawer` prop `closeButtonText`. * docs: add changeset * refactor: use InnerCloseButtonProps and passthrough to DBDrawer
1 parent 1b4c7fd commit 211cf1d

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.changeset/cold-cycles-decide.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@db-ux/core-components": minor
3+
"@db-ux/ngx-core-components": minor
4+
"@db-ux/react-core-components": minor
5+
"@db-ux/wc-core-components": minor
6+
"@db-ux/v-core-components": minor
7+
---
8+
9+
feat(DBHeader): Passthrough property `closeButtonText` for the close button within the inner `DBDrawer`.

packages/components/src/components/header/header.lite.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ export default function DBHeader(props: DBHeaderProps) {
7171
class="db-header-drawer"
7272
rounded
7373
spacing="small"
74+
closeButtonId={props.closeButtonId}
75+
closeButtonText={props.closeButtonText}
7476
open={getBoolean(props.drawerOpen)}
7577
onClose={() => state.handleToggle()}>
7678
<div class="db-header-drawer-navigation">

packages/components/src/components/header/model.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
GlobalProps,
44
GlobalState,
55
InitializedState,
6+
InnerCloseButtonProps,
67
NavigationBehaviorState,
78
ToggleEventProps,
89
ToggleEventState
@@ -51,6 +52,7 @@ export type DBHeaderDefaultProps = {
5152
};
5253

5354
export type DBHeaderProps = DBHeaderDefaultProps &
55+
InnerCloseButtonProps &
5456
GlobalProps &
5557
ToggleEventProps &
5658
ContainerWidthProps;

0 commit comments

Comments
 (0)