Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Label---Add-small-variant-662303…
Browse files Browse the repository at this point in the history
…2676' into Label---Add-small-variant-6623032676
  • Loading branch information
rivka-ungar committed May 16, 2024
2 parents 86d93aa + ffd0cc0 commit c929d2d
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 43 deletions.
12 changes: 6 additions & 6 deletions packages/core/src/components/AlertBanner/AlertBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getStyle } from "../../helpers/typesciptCssModulesHelper";
import cx from "classnames";
import React, { ForwardedRef, forwardRef, ReactElement, useMemo } from "react";
import Button from "../../components/Button/Button";
import Icon from "../../components/Icon/Icon";
import IconButton from "../../components/IconButton/IconButton";
import CloseSmall from "../../components/Icon/Icons/components/CloseSmall";
import { AlertBannerBackgroundColor } from "./AlertBannerConstants";
import { NOOP } from "../../utils/function-utils";
Expand Down Expand Up @@ -126,17 +126,17 @@ const AlertBanner: VibeComponent<AlertBannerProps> & {
</AlertBannerContext.Provider>
<div className={cx(styles.closeButtonWrapper)}>
{isCloseHidden ? null : (
<Button
<IconButton
data-testid="alert-banner-close-button"
icon={CloseSmall}
className={cx(styles.closeBtn)}
hideTooltip
onClick={onClose}
size={Button.sizes.SMALL}
kind={Button.kinds.TERTIARY}
kind={IconButton.kinds.TERTIARY}
color={isDarkBackground ? Button.colors.ON_INVERTED_BACKGROUND : Button.colors.ON_PRIMARY_COLOR}
ariaLabel={closeButtonAriaLabel}
>
<Icon iconType={Icon.type.SVG} clickable={false} icon={CloseSmall} iconSize="20px" ignoreFocusStyle />
</Button>
/>
)}
</div>
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,33 @@ exports[`AlertBanner should render correctly with props 1`] = `
aria-busy={false}
aria-disabled={false}
aria-label="Close"
className="closeBtn button sizeSmall kindTertiary colorOnPrimaryColor"
className="closeBtn button sizeMedium kindTertiary colorOnPrimaryColor noSidePadding"
data-testid="alert-banner-close-button"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseDown={[Function]}
onMouseUp={[Function]}
style={
{
"alignItems": "center",
"height": "32px",
"justifyContent": "center",
"padding": 0,
"width": "32px",
}
}
type="button"
>
<svg
aria-hidden={true}
className="icon noFocusStyle"
data-testid="icon"
fill="currentColor"
height="20px"
height="20"
onClick={[Function]}
viewBox="0 0 20 20"
width="20px"
width="20"
>
<path
clipRule="evenodd"
Expand Down Expand Up @@ -98,24 +107,33 @@ exports[`AlertBanner should render correctly without props 1`] = `
aria-busy={false}
aria-disabled={false}
aria-label="Close"
className="closeBtn button sizeSmall kindTertiary colorOnPrimaryColor"
className="closeBtn button sizeMedium kindTertiary colorOnPrimaryColor noSidePadding"
data-testid="alert-banner-close-button"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseDown={[Function]}
onMouseUp={[Function]}
style={
{
"alignItems": "center",
"height": "32px",
"justifyContent": "center",
"padding": 0,
"width": "32px",
}
}
type="button"
>
<svg
aria-hidden={true}
className="icon noFocusStyle"
data-testid="icon"
fill="currentColor"
height="20px"
height="20"
onClick={[Function]}
viewBox="0 0 20 20"
width="20px"
width="20"
>
<path
clipRule="evenodd"
Expand Down Expand Up @@ -229,24 +247,33 @@ exports[`AlertBanner should render with correctly with multiple elements 1`] = `
aria-busy={false}
aria-disabled={false}
aria-label="Close"
className="closeBtn button sizeSmall kindTertiary colorOnPrimaryColor"
className="closeBtn button sizeMedium kindTertiary colorOnPrimaryColor noSidePadding"
data-testid="alert-banner-close-button"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseDown={[Function]}
onMouseUp={[Function]}
style={
{
"alignItems": "center",
"height": "32px",
"justifyContent": "center",
"padding": 0,
"width": "32px",
}
}
type="button"
>
<svg
aria-hidden={true}
className="icon noFocusStyle"
data-testid="icon"
fill="currentColor"
height="20px"
height="20"
onClick={[Function]}
viewBox="0 0 20 20"
width="20px"
width="20"
>
<path
clipRule="evenodd"
Expand Down Expand Up @@ -321,24 +348,33 @@ exports[`AlertBanner should render with correctly with text and link 1`] = `
aria-busy={false}
aria-disabled={false}
aria-label="Close"
className="closeBtn button sizeSmall kindTertiary colorOnPrimaryColor"
className="closeBtn button sizeMedium kindTertiary colorOnPrimaryColor noSidePadding"
data-testid="alert-banner-close-button"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseDown={[Function]}
onMouseUp={[Function]}
style={
{
"alignItems": "center",
"height": "32px",
"justifyContent": "center",
"padding": 0,
"width": "32px",
}
}
type="button"
>
<svg
aria-hidden={true}
className="icon noFocusStyle"
data-testid="icon"
fill="currentColor"
height="20px"
height="20"
onClick={[Function]}
viewBox="0 0 20 20"
width="20px"
width="20"
>
<path
clipRule="evenodd"
Expand Down Expand Up @@ -409,24 +445,33 @@ exports[`AlertBanner should render with correctly with text and link 2`] = `
aria-busy={false}
aria-disabled={false}
aria-label="Close"
className="closeBtn button sizeSmall kindTertiary colorOnPrimaryColor"
className="closeBtn button sizeMedium kindTertiary colorOnPrimaryColor noSidePadding"
data-testid="alert-banner-close-button"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseDown={[Function]}
onMouseUp={[Function]}
style={
{
"alignItems": "center",
"height": "32px",
"justifyContent": "center",
"padding": 0,
"width": "32px",
}
}
type="button"
>
<svg
aria-hidden={true}
className="icon noFocusStyle"
data-testid="icon"
fill="currentColor"
height="20px"
height="20"
onClick={[Function]}
viewBox="0 0 20 20"
width="20px"
width="20"
>
<path
clipRule="evenodd"
Expand Down
Loading

0 comments on commit c929d2d

Please sign in to comment.