ICIJ / datashare

A self-hosted search engine for documents.
https://datashare.icij.org
GNU Affero General Public License v3.0
596 stars 53 forks source link

design system: app modal prompt #1523

Closed pirhoo closed 2 months ago

pirhoo commented 2 months ago

A generic modal to collect user input.

The AppModalPrompt must implement the AppModal component with:

Preview

Image

caro3801 commented 2 months ago

component is here: https://icij.github.io/datashare-client/?path=/docs/components-appmodal-appmodalprompt--docs

Soliine commented 2 months ago

Looks great!

Wdyt of having the focus on the input field as soon as we open the modal?

It would come handy and since we removed the colon at the end of the sentence "Name your saved search", I find it not easy to understand that the input is an input. Let me know what you think!

caro3801 commented 2 months ago

The placeholder argument was missing. Autofocus is a nice feature when it comes to quickly name things. I added a property to the component so we can choose depending on the context. Fix: add input placeholder Feat: add auto focus props https://icij.github.io/datashare-client/?path=/docs/components-appmodal-appmodalprompt--docs

Soliine commented 2 months ago

Awesome! 👏