Skip to content

Commit

Permalink
more material icon component cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kabeaty committed Jun 29, 2023
1 parent 7c8ece4 commit 49ddb46
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/core/client/stream/common/MessageBox/MessageBoxIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
QuestionHelpMessageIcon,
SvgIcon,
} from "coral-ui/components/icons";
import { IconProps } from "coral-ui/components/v2/Icon";
import { withForwardRef, withStyles } from "coral-ui/hocs";

import styles from "./MessageBoxIcon.css";
Expand All @@ -24,9 +23,9 @@ interface Props extends Omit<HTMLAttributes<HTMLSpanElement>, "color"> {
* This prop can be used to add custom classnames.
* It is handled by the `withStyles `HOC.
*/
classes: typeof styles & IconProps["classes"];
classes: typeof styles;

size?: IconProps["size"];
size?: "xs" | "sm" | "md" | "lg" | "xl";

/** The name of the icon to render */
icon: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
import { useFetch, withFragmentContainer } from "coral-framework/lib/relay";
import CLASSES from "coral-stream/classes";
import WarningError from "coral-stream/common/WarningError";
import { Icon } from "coral-ui/components/v2";
import { ConversationChatTextIcon, SvgIcon } from "coral-ui/components/icons";
import { Button, CallOut } from "coral-ui/components/v3";
import { useShadowRootOrDocument } from "coral-ui/encapsulation";

Expand Down Expand Up @@ -280,7 +280,7 @@ const ReplyCommentFormContainer: FunctionComponent<Props> = ({
Your reply has posted below
</Localized>
}
icon={<Icon>question_answer</Icon>}
icon={<SvgIcon Icon={ConversationChatTextIcon} />}
iconColor="none"
color="primary"
aria-live="polite"
Expand Down
6 changes: 2 additions & 4 deletions src/core/client/ui/components/v2/Message/MessageIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@ import React, {
import { SvgIcon } from "coral-ui/components/icons";
import { withForwardRef, withStyles } from "coral-ui/hocs";

import { IconProps } from "../Icon";

import styles from "./MessageIcon.css";

interface Props extends Omit<HTMLAttributes<HTMLSpanElement>, "color"> {
/**
* This prop can be used to add custom classnames.
* It is handled by the `withStyles `HOC.
*/
classes: typeof styles & IconProps["classes"];
classes: typeof styles;

size?: IconProps["size"];
size?: "xs" | "sm" | "md" | "lg" | "xl";

Icon: ComponentType;

Expand Down

0 comments on commit 49ddb46

Please sign in to comment.