= props => {
return (
- {icon && (
-
- {icon}
-
- )}
{children}
);
diff --git a/src/core/client/ui/components/Message/MessageIcon.css b/src/core/client/ui/components/Message/MessageIcon.css
new file mode 100644
index 000000000..df730b2de
--- /dev/null
+++ b/src/core/client/ui/components/Message/MessageIcon.css
@@ -0,0 +1,5 @@
+.root {
+ &:first-child {
+ margin-right: calc(0.5 * var(--spacing-unit));
+ }
+}
diff --git a/src/core/client/ui/components/Message/MessageIcon.tsx b/src/core/client/ui/components/Message/MessageIcon.tsx
new file mode 100644
index 000000000..cd4d0ad13
--- /dev/null
+++ b/src/core/client/ui/components/Message/MessageIcon.tsx
@@ -0,0 +1,36 @@
+import cn from "classnames";
+import React, { HTMLAttributes, Ref, StatelessComponent } from "react";
+
+import Icon, { IconProps } from "talk-ui/components/Icon";
+import { withForwardRef, withStyles } from "talk-ui/hocs";
+
+import * as styles from "./MessageIcon.css";
+
+interface InnerProps extends HTMLAttributes {
+ /**
+ * This prop can be used to add custom classnames.
+ * It is handled by the `withStyles `HOC.
+ */
+ classes: typeof styles & IconProps["classes"];
+
+ size?: IconProps["size"];
+
+ /** The name of the icon to render */
+ children: string;
+
+ /** Internal: Forwarded Ref */
+ forwardRef?: Ref;
+}
+
+export const MessageIcon: StatelessComponent = props => {
+ const { classes, className, forwardRef, ...rest } = props;
+ const rootClassName = cn(classes.root, className);
+ return ;
+};
+
+MessageIcon.defaultProps = {
+ size: "sm",
+};
+
+const enhanced = withForwardRef(withStyles(styles)(MessageIcon));
+export default enhanced;