feat(fluxWizard): allow to specify exact content of copy-clipboard notification
parent
4848895e73
commit
dd012f96b9
|
@ -834,23 +834,21 @@ export const validateSuccess = (): Notification => ({
|
||||||
|
|
||||||
export const notifyCopyToClipboardSuccess = (
|
export const notifyCopyToClipboardSuccess = (
|
||||||
text: string | null,
|
text: string | null,
|
||||||
title: string = ''
|
title: string = '',
|
||||||
|
suffix: string = ' has been copied to clipboard.'
|
||||||
): Notification => ({
|
): Notification => ({
|
||||||
...defaultSuccessNotification,
|
...defaultSuccessNotification,
|
||||||
icon: 'dash-h',
|
icon: 'dash-h',
|
||||||
message: `${title}${
|
message: `${title}${text === null ? '' : "'" + text + "'"}${suffix}`,
|
||||||
text === null ? '' : "'" + text + "'"
|
|
||||||
} has been copied to clipboard.`,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
export const notifyCopyToClipboardFailed = (
|
export const notifyCopyToClipboardFailed = (
|
||||||
text: string | null,
|
text: string | null,
|
||||||
title: string = ''
|
title: string = '',
|
||||||
|
suffix: string = ' was not copied to clipboard.'
|
||||||
): Notification => ({
|
): Notification => ({
|
||||||
...defaultErrorNotification,
|
...defaultErrorNotification,
|
||||||
message: `${title}${
|
message: `${title}${text === null ? '' : "'" + text + "'"}${suffix}`,
|
||||||
text === null ? '' : "'" + text + "'"
|
|
||||||
} was not copied to clipboard.`,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
export const notifyFluxNameAlreadyTaken = (fluxName: string): Notification => ({
|
export const notifyFluxNameAlreadyTaken = (fluxName: string): Notification => ({
|
||||||
|
|
Loading…
Reference in New Issue