Load previous state in alt text modal (#546)
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
import {RootStoreModel} from 'state/index'
|
||||
|
||||
export async function openAltTextModal(store: RootStoreModel): Promise<string> {
|
||||
export async function openAltTextModal(
|
||||
store: RootStoreModel,
|
||||
prevAltText: string,
|
||||
): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
store.shell.openModal({
|
||||
name: 'alt-text-image',
|
||||
prevAltText,
|
||||
onAltTextSet: (altText?: string) => {
|
||||
if (altText) {
|
||||
resolve(altText)
|
||||
|
||||
Reference in New Issue
Block a user