Allow clicking on narrow version of idle primary device warning
This commit is contained in:
@@ -27,7 +27,7 @@ export type PropsType = {
|
|||||||
| {
|
| {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
clickLabel: string;
|
clickLabel: string;
|
||||||
hasAction: true;
|
hasAction: boolean;
|
||||||
}
|
}
|
||||||
) &
|
) &
|
||||||
(
|
(
|
||||||
|
@@ -8,8 +8,9 @@ import {
|
|||||||
LeftPaneDialogIcon,
|
LeftPaneDialogIcon,
|
||||||
LeftPaneDialogIconBackground,
|
LeftPaneDialogIconBackground,
|
||||||
} from './LeftPaneDialog';
|
} from './LeftPaneDialog';
|
||||||
import type { WidthBreakpoint } from './_util';
|
import { WidthBreakpoint } from './_util';
|
||||||
import type { LocalizerType } from '../types/I18N';
|
import type { LocalizerType } from '../types/I18N';
|
||||||
|
import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser';
|
||||||
|
|
||||||
export type Props = {
|
export type Props = {
|
||||||
containerWidthBreakpoint: WidthBreakpoint;
|
containerWidthBreakpoint: WidthBreakpoint;
|
||||||
@@ -33,6 +34,13 @@ export function WarningIdlePrimaryDeviceDialog({
|
|||||||
<LeftPaneDialogIcon type="error" />
|
<LeftPaneDialogIcon type="error" />
|
||||||
</LeftPaneDialogIconBackground>
|
</LeftPaneDialogIconBackground>
|
||||||
}
|
}
|
||||||
|
{...(containerWidthBreakpoint === WidthBreakpoint.Narrow
|
||||||
|
? {
|
||||||
|
onClick: () => openLinkInWebBrowser(SUPPORT_PAGE),
|
||||||
|
clickLabel: i18n('icu:IdlePrimaryDevice__learnMore'),
|
||||||
|
hasAction: false,
|
||||||
|
}
|
||||||
|
: { hasAction: false })}
|
||||||
{...(handleClose == null
|
{...(handleClose == null
|
||||||
? { hasXButton: false }
|
? { hasXButton: false }
|
||||||
: {
|
: {
|
||||||
@@ -42,11 +50,13 @@ export function WarningIdlePrimaryDeviceDialog({
|
|||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{i18n('icu:IdlePrimaryDevice__body')}
|
{i18n('icu:IdlePrimaryDevice__body')}
|
||||||
|
{containerWidthBreakpoint !== WidthBreakpoint.Narrow ? (
|
||||||
<div>
|
<div>
|
||||||
<a href={SUPPORT_PAGE} rel="noreferrer" target="_blank">
|
<a href={SUPPORT_PAGE} rel="noreferrer" target="_blank">
|
||||||
{i18n('icu:IdlePrimaryDevice__learnMore')}
|
{i18n('icu:IdlePrimaryDevice__learnMore')}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
) : null}
|
||||||
</LeftPaneDialog>
|
</LeftPaneDialog>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user