test: adds test to check if adding a new company or people works (#1714)
* test: adds test to check if adding a new company or people works * test: improves people/add and companies/add tests * style: cleanup * style: cleanup
This commit is contained in:
@ -19,6 +19,7 @@ export type IconButtonProps = {
|
||||
disabled?: boolean;
|
||||
focus?: boolean;
|
||||
dataTestId?: string;
|
||||
ariaLabel?: string;
|
||||
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
||||
};
|
||||
|
||||
@ -279,6 +280,7 @@ export const IconButton = ({
|
||||
disabled = false,
|
||||
focus = false,
|
||||
dataTestId,
|
||||
ariaLabel,
|
||||
onClick,
|
||||
}: IconButtonProps) => {
|
||||
const theme = useTheme();
|
||||
@ -293,6 +295,7 @@ export const IconButton = ({
|
||||
accent={accent}
|
||||
className={className}
|
||||
onClick={onClick}
|
||||
aria-label={ariaLabel}
|
||||
>
|
||||
{Icon && <Icon size={theme.icon.size.md} />}
|
||||
</StyledButton>
|
||||
|
||||
@ -8,10 +8,11 @@ type OwnProps = {
|
||||
export const PageAddButton = ({ onClick }: OwnProps) => (
|
||||
<IconButton
|
||||
Icon={IconPlus}
|
||||
dataTestId="add-button"
|
||||
size="medium"
|
||||
variant="secondary"
|
||||
data-testid="add-button"
|
||||
accent="default"
|
||||
onClick={onClick}
|
||||
ariaLabel="Add"
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user