diff options
Diffstat (limited to 'src/view/com/composer/photos')
-rw-r--r-- | src/view/com/composer/photos/Gallery.tsx | 13 | ||||
-rw-r--r-- | src/view/com/composer/photos/ImageAltTextDialog.tsx | 6 | ||||
-rw-r--r-- | src/view/com/composer/photos/SelectGifBtn.tsx | 5 |
3 files changed, 3 insertions, 21 deletions
diff --git a/src/view/com/composer/photos/Gallery.tsx b/src/view/com/composer/photos/Gallery.tsx index 3958a85c0..5ff7042bc 100644 --- a/src/view/com/composer/photos/Gallery.tsx +++ b/src/view/com/composer/photos/Gallery.tsx @@ -21,7 +21,6 @@ import {ComposerImage, cropImage} from '#/state/gallery' import {Text} from '#/view/com/util/text/Text' import {useTheme} from '#/alf' import * as Dialog from '#/components/Dialog' -import {PortalComponent} from '#/components/Portal' import {ComposerAction} from '../state/composer' import {EditImageDialog} from './EditImageDialog' import {ImageAltTextDialog} from './ImageAltTextDialog' @@ -31,7 +30,6 @@ const IMAGE_GAP = 8 interface GalleryProps { images: ComposerImage[] dispatch: (action: ComposerAction) => void - Portal: PortalComponent } export let Gallery = (props: GalleryProps): React.ReactNode => { @@ -59,12 +57,7 @@ interface GalleryInnerProps extends GalleryProps { containerInfo: Dimensions } -const GalleryInner = ({ - images, - containerInfo, - dispatch, - Portal, -}: GalleryInnerProps) => { +const GalleryInner = ({images, containerInfo, dispatch}: GalleryInnerProps) => { const {isMobile} = useWebMediaQueries() const {altTextControlStyle, imageControlsStyle, imageStyle} = @@ -118,7 +111,6 @@ const GalleryInner = ({ onRemove={() => { dispatch({type: 'embed_remove_image', image}) }} - Portal={Portal} /> ) })} @@ -135,7 +127,6 @@ type GalleryItemProps = { imageStyle?: ViewStyle onChange: (next: ComposerImage) => void onRemove: () => void - Portal: PortalComponent } const GalleryItem = ({ @@ -145,7 +136,6 @@ const GalleryItem = ({ imageStyle, onChange, onRemove, - Portal, }: GalleryItemProps): React.ReactNode => { const {_} = useLingui() const t = useTheme() @@ -240,7 +230,6 @@ const GalleryItem = ({ control={altTextControl} image={image} onChange={onChange} - Portal={Portal} /> <EditImageDialog diff --git a/src/view/com/composer/photos/ImageAltTextDialog.tsx b/src/view/com/composer/photos/ImageAltTextDialog.tsx index e9e8d4222..aa0b0987a 100644 --- a/src/view/com/composer/photos/ImageAltTextDialog.tsx +++ b/src/view/com/composer/photos/ImageAltTextDialog.tsx @@ -15,21 +15,18 @@ import * as Dialog from '#/components/Dialog' import {DialogControlProps} from '#/components/Dialog' import * as TextField from '#/components/forms/TextField' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' -import {PortalComponent} from '#/components/Portal' import {Text} from '#/components/Typography' type Props = { control: Dialog.DialogOuterProps['control'] image: ComposerImage onChange: (next: ComposerImage) => void - Portal: PortalComponent } export const ImageAltTextDialog = ({ control, image, onChange, - Portal, }: Props): React.ReactNode => { const [altText, setAltText] = React.useState(image.alt) @@ -41,8 +38,7 @@ export const ImageAltTextDialog = ({ ...image, alt: enforceLen(altText, MAX_ALT_TEXT, true), }) - }} - Portal={Portal}> + }}> <Dialog.Handle /> <ImageAltTextInner control={control} diff --git a/src/view/com/composer/photos/SelectGifBtn.tsx b/src/view/com/composer/photos/SelectGifBtn.tsx index d482e0783..d13df0a11 100644 --- a/src/view/com/composer/photos/SelectGifBtn.tsx +++ b/src/view/com/composer/photos/SelectGifBtn.tsx @@ -9,16 +9,14 @@ import {atoms as a, useTheme} from '#/alf' import {Button} from '#/components/Button' import {GifSelectDialog} from '#/components/dialogs/GifSelect' import {GifSquare_Stroke2_Corner0_Rounded as GifIcon} from '#/components/icons/Gif' -import {PortalComponent} from '#/components/Portal' type Props = { onClose: () => void onSelectGif: (gif: Gif) => void disabled?: boolean - Portal?: PortalComponent } -export function SelectGifBtn({onClose, onSelectGif, disabled, Portal}: Props) { +export function SelectGifBtn({onClose, onSelectGif, disabled}: Props) { const {_} = useLingui() const ref = useRef<{open: () => void}>(null) const t = useTheme() @@ -48,7 +46,6 @@ export function SelectGifBtn({onClose, onSelectGif, disabled, Portal}: Props) { controlRef={ref} onClose={onClose} onSelectGif={onSelectGif} - Portal={Portal} /> </> ) |