Deduplicate icons using Compound Design Tokens (#150)
* Deduplicate icons using Compound Design Tokens Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update snapshot Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
63986f8c42
commit
d770e2afcc
@@ -7,8 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { ReactNode } from "react";
|
||||
|
||||
import { Icon as WarningBadgeIcon } from "../../../res/img/compound/error-16px.svg";
|
||||
import { WarningIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
|
||||
|
||||
interface ErrorMessageProps {
|
||||
message: string | ReactNode | null;
|
||||
@@ -19,7 +18,7 @@ interface ErrorMessageProps {
|
||||
* Reserves two lines to display errors to prevent layout shifts when the error pops up.
|
||||
*/
|
||||
export const ErrorMessage: React.FC<ErrorMessageProps> = ({ message }) => {
|
||||
const icon = message ? <WarningBadgeIcon className="mx_Icon mx_Icon_16" /> : null;
|
||||
const icon = message ? <WarningIcon className="mx_Icon mx_Icon_16" /> : null;
|
||||
|
||||
return (
|
||||
<div className="mx_ErrorMessage">
|
||||
|
||||
Reference in New Issue
Block a user