mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 03:49:11 +00:00
29 lines
635 B
TypeScript
29 lines
635 B
TypeScript
import * as React from 'react';
|
|
import {
|
|
ErrorDivider,
|
|
ErrorSideCode,
|
|
ErrorText,
|
|
ErrorTextLower,
|
|
ErrorWrapper,
|
|
} from './ErrorBanner.styled';
|
|
|
|
export type ErrorMessage = {
|
|
english: string;
|
|
japanese?: string;
|
|
friendlyCode?: string;
|
|
};
|
|
|
|
type ErrorBannerProps = {
|
|
message: Required<ErrorMessage>;
|
|
};
|
|
|
|
export const ErrorBanner = (props: ErrorBannerProps) => (
|
|
<ErrorWrapper>
|
|
<ErrorSideCode>{props.message.friendlyCode}</ErrorSideCode>
|
|
<ErrorDivider />
|
|
<div>
|
|
<ErrorText>{props.message.english}</ErrorText>
|
|
<ErrorTextLower>{props.message.japanese}</ErrorTextLower>
|
|
</div>
|
|
</ErrorWrapper>
|
|
);
|