Skip to content

Commit

Permalink
fix: made the unsupported-browser warning-text easier to read
Browse files Browse the repository at this point in the history
  • Loading branch information
malmen237 committed May 2, 2024
1 parent f22d017 commit c3e3a20
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
14 changes: 12 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,18 @@ const App = () => {
{!isValidBrowser && !unsupportedContinue && (
<DisplayBoxPositioningContainer>
<DisplayWarning
text="To use this application it is recommended to use one of the following browsers: Chrome, Edge, Firefox or Safari.
If you are using one of the recommended browsers, then it is an older version and should be updated before continuing."
text={
<>
<p>
To use this application it is recommended to use one of the
following browsers: Chrome, Edge, Firefox or Safari.
</p>
<p>
If you are using one of the recommended browsers, then it is
an older version and should be updated before continuing.
</p>
</>
}
title="Browser not supported"
btn={() => setUnsupportedContinue(true)}
/>
Expand Down
6 changes: 5 additions & 1 deletion src/components/display-box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ const DisplayBoxButton = styled(PrimaryButton)`
margin: 1rem;
`;

type TDisplayWarning = { text: string; title?: string; btn?: () => void };
type TDisplayWarning = {
text: string | JSX.Element;
title?: string;
btn?: () => void;
};

export const DisplayWarning = ({ text, title, btn }: TDisplayWarning) => {
return (
Expand Down

0 comments on commit c3e3a20

Please sign in to comment.