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
|
@ -15,14 +15,15 @@ import {isDesktopWeb} from 'platform/detection'
|
|||
export const snapPoints = ['80%']
|
||||
|
||||
interface Props {
|
||||
prevAltText: string
|
||||
onAltTextSet: (altText?: string | undefined) => void
|
||||
}
|
||||
|
||||
export function Component({onAltTextSet}: Props) {
|
||||
export function Component({prevAltText, onAltTextSet}: Props) {
|
||||
const pal = usePalette('default')
|
||||
const store = useStores()
|
||||
const theme = useTheme()
|
||||
const [altText, setAltText] = useState('')
|
||||
const [altText, setAltText] = useState(prevAltText)
|
||||
|
||||
const onPressSave = useCallback(() => {
|
||||
onAltTextSet(altText)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue