Merged in fix/icons (pull request #3468)
feat(SW-3695): more icons fixes... * feat(SW-3695): more icons fixes...
This commit is contained in:
@@ -15,11 +15,7 @@ export default function ValidationError() {
|
||||
variant="Body/Supporting text (caption)/smBold"
|
||||
>
|
||||
<span>
|
||||
<MaterialIcon
|
||||
icon="error_circle_rounded"
|
||||
color="Icon/Feedback/Error"
|
||||
size={20}
|
||||
/>
|
||||
<MaterialIcon icon="error" color="Icon/Feedback/Error" size={20} />
|
||||
{intl.formatMessage({
|
||||
id: "bookingWidget.validationError.destination",
|
||||
defaultMessage: "Enter destination or hotel",
|
||||
|
||||
@@ -20,11 +20,7 @@ export default function ValidationError() {
|
||||
variant="Body/Supporting text (caption)/smBold"
|
||||
>
|
||||
<span>
|
||||
<MaterialIcon
|
||||
icon="error_circle_rounded"
|
||||
color="Icon/Feedback/Error"
|
||||
size={20}
|
||||
/>
|
||||
<MaterialIcon icon="error" color="Icon/Feedback/Error" size={20} />
|
||||
{errorMessage}
|
||||
</span>
|
||||
</Typography>
|
||||
|
||||
@@ -11,11 +11,7 @@ export default function RoomNotAvailable() {
|
||||
return (
|
||||
<div className={styles.noRoomsContainer}>
|
||||
<div className={styles.noRooms}>
|
||||
<MaterialIcon
|
||||
icon="error_circle_rounded"
|
||||
color="Icon/Feedback/Error"
|
||||
size={16}
|
||||
/>
|
||||
<MaterialIcon icon="error" color="Icon/Feedback/Error" size={16} />
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
.iconWrapper {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import { HTMLAttributes } from "react"
|
||||
import { MaterialIconName, materialIcons } from "./generated"
|
||||
import { VariantProps } from "class-variance-authority"
|
||||
import { iconVariants } from "../variants"
|
||||
import styles from "./index.module.css"
|
||||
|
||||
export interface MaterialIconProps
|
||||
extends
|
||||
@@ -51,7 +52,12 @@ export function MaterialIcon({
|
||||
const iconClassName = iconVariants({ color })
|
||||
|
||||
return (
|
||||
<span data-testid="MaterialIcon" data-icon-name={icon} {...props}>
|
||||
<span
|
||||
data-testid="MaterialIcon"
|
||||
data-icon-name={icon}
|
||||
className={`${styles.iconWrapper}`}
|
||||
{...props}
|
||||
>
|
||||
<IconComponent
|
||||
width={size}
|
||||
height={size}
|
||||
|
||||
Reference in New Issue
Block a user