diff --git a/src/base/Button/Button.tsx b/src/base/Button/Button.tsx index 534ae2de0..72640587a 100644 --- a/src/base/Button/Button.tsx +++ b/src/base/Button/Button.tsx @@ -3,11 +3,12 @@ import { Button as MuiButton, type ButtonProps as MuiButtonProps } from '@mui/ma export interface ButtonProps extends MuiButtonProps { label?: string; children?: React.ReactNode; + 'data-testid'?: string; } export function Button({ label, children, ...props }: ButtonProps): JSX.Element { return ( - + {label} {children} @@ -15,17 +16,17 @@ export function Button({ label, children, ...props }: ButtonProps): JSX.Element } export const ContainedButton = (props: ButtonProps): JSX.Element => ( - ); export const OutlinedButton = (props: ButtonProps): JSX.Element => ( - ); export const TextButton = (props: ButtonProps): JSX.Element => ( - ); diff --git a/src/base/Switch/Switch.tsx b/src/base/Switch/Switch.tsx index 820c12cc8..9c8a47904 100644 --- a/src/base/Switch/Switch.tsx +++ b/src/base/Switch/Switch.tsx @@ -1,7 +1,11 @@ import { Switch as MuiSwitch, type SwitchProps as MuiSwitchProps } from '@mui/material'; import React from 'react'; -const Switch = React.forwardRef((props, ref) => { +interface ExtendedSwitchProps extends MuiSwitchProps { + 'data-testid'?: string; +} + +const Switch = React.forwardRef((props, ref) => { return ; }); diff --git a/src/base/Typography/Typography.tsx b/src/base/Typography/Typography.tsx index 70ea97827..5bc51fc3f 100644 --- a/src/base/Typography/Typography.tsx +++ b/src/base/Typography/Typography.tsx @@ -4,7 +4,11 @@ import { } from '@mui/material'; import React from 'react'; -const Typography = React.forwardRef((props, ref) => { +interface ExtendedTypographyProps extends MuiTypographyProps { + 'data-testid'?: string; +} + +const Typography = React.forwardRef((props, ref) => { return ; });