f0706dbe9f
* Add alt text support and rework image layout * Add additional BottomSheet implementation to account for nested Composer modal * Use mobile gallery layout on mobile web * Missing key * Fix lint * Move altimage modal into the standard modal system * Fix overflow wrapping of images * Fixes to the alt-image modal * Remove unnecessary switch * Restore old imagelayoutgrid code --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
17 lines
411 B
TypeScript
17 lines
411 B
TypeScript
import {RootStoreModel} from 'state/index'
|
|
|
|
export async function openAltTextModal(store: RootStoreModel): Promise<string> {
|
|
return new Promise((resolve, reject) => {
|
|
store.shell.openModal({
|
|
name: 'alt-text-image',
|
|
onAltTextSet: (altText?: string) => {
|
|
if (altText) {
|
|
resolve(altText)
|
|
} else {
|
|
reject(new Error('Canceled'))
|
|
}
|
|
},
|
|
})
|
|
})
|
|
}
|