mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
## Summary Adds delete icon to top-right corner of thumbnails in file picker. <img width="58" alt="image" src="https://user-images.githubusercontent.com/82822460/210840710-4c2da19d-1aa1-43bf-a4af-3bc7c5d1ff49.png"> - Allows to specify a *predicate* function, which controls if the delete button is shown for a file. - Implements the predicate function inside the `image_embeddable` plugin, such as to show the button only for files that user themselves uploaded. Closes https://github.com/elastic/kibana/issues/144695 Closes https://github.com/elastic/kibana/pull/144980 Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
---|---|---|
.. | ||
src | ||
index.tsx | ||
jest.config.js | ||
kibana.jsonc | ||
package.json | ||
README.mdx | ||
tsconfig.json |
--- id: sharedUX/Components/FilePicker slug: /shared-ux/components/file-picker title: File picker description: Pick or upload files from Kibana. tags: ['shared-ux', 'component', 'files'] date: 2022-11-22 --- ## Description A component designed to capture the UX of picking files. Use cases include: * A dashboard user wanting to upload an image to their dashboard * A user picking a new avatar * A cases user selecting from a set of text files they want to attach to a case * ...and many more ## Usage Must be wrapped in the `FilesContext`. ```tsx <FilesContext ...> <FilePicker ... /> </FilesContext> ```