How to remove an image from a Figma widget?

24 Views Asked by At

I'm building a Figma widget with typescript. The widget lets me upload the image but won't let me remove the image from the widget. Does anybody know what I'm missing?

if (props.imageString == '') {
      return (
        <FileUploadDropzone
          onSelectedFiles={handleSelectedFiles}
        >
          <Text align="center">
            <Muted>Click or Drop Your Image Here</Muted>
          </Text>

        </FileUploadDropzone>
      )
    }

    if (props.imageString && props.imageString !== '') {
      return (
        <Fragment>
          <div className={styles.uploadedFileArea}>
            <Text align="center">
              <Muted>Remove Image</Muted>
            </Text>
            <IconCross32 />
          </div>
        </Fragment>
      )
    }

    return null
0

There are 0 best solutions below