Load previous state in alt text modal (#546)
This commit is contained in:
parent
c8e51a7d48
commit
7a2c21026d
4 changed files with 11 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue