Skip to content

Commit

Permalink
*fix testing library not in dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Sodik committed Sep 9, 2024
1 parent 07a65dc commit 4ad602c
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions packages/ui/src/AppHeader/AppHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { ReactNode } from 'react'
import cls from 'classnames'
import { DataTestProp } from '@hazelcast/helpers'

import { EnvironmentBadge } from './EnvironmentBadge'
import { AppHeaderMenu, AppHeaderMenuProps } from './AppHeaderMenu'
Expand All @@ -8,7 +9,7 @@ import { SelectCluster, SelectClusterProps } from './SelectCluster'

import styles from './AppHeader.module.scss'

export interface AppHeaderProps {
export interface AppHeaderProps extends DataTestProp {
name: ReactNode
className?: string
children?: ReactNode
Expand All @@ -18,8 +19,17 @@ export interface AppHeaderProps {
menuContent?: AppHeaderMenuProps['children']
}

export const AppHeader = ({ name, className, children, environment, clusterSelectProps, logoProps, menuContent }: AppHeaderProps) => (
<header className={cls(styles.root, className)}>
export const AppHeader = ({
name,
className,
children,
environment,
clusterSelectProps,
logoProps,
menuContent,
'data-test': dataTest = 'app-header',
}: AppHeaderProps) => (
<header data-test={dataTest} className={cls(styles.root, className)}>
<AppHeaderLogo {...logoProps} />
<span className={styles.name}>{name}</span>
{clusterSelectProps && <SelectCluster {...clusterSelectProps} />}
Expand Down

0 comments on commit 4ad602c

Please sign in to comment.