awesome-panel / panel-modal

A Modal that works with Panel in both server and notebook environments.
20 stars 2 forks source link

Change name & tip text #2

Closed peterlee18 closed 9 months ago

peterlee18 commented 9 months ago

Hi Marc,

This panel_modal is perfect for my use case.

Is it possible to have the "Open" label to be configurable. and also the tip text "Trigger this to open the modal". In my use case, the modal opens up a file browser. So I would like button to be be labelled "Browse" and the tip text to say something like "Click to open file browser". But I'm sure there will be numerous use casesecah with their own labels and tip text.

Thanks

MarcSkovMadsen commented 9 months ago

Thanks for the nice feedback.

You can achieve what you are after by creating custom buttons with a name="Browse" and description="Click to open file browser". The button should then trigger an opening of the Modal when clicked.

If you need further help try posting a minimum, reproducible example. Then its easy for me to add a custom button.

peterlee18 commented 9 months ago

Ok got it. Use the mymodal.param.trigger("open") event, where mymodal is the Modal instance.

Thanks Marc

From: Marc Skov Madsen @.> Sent: Saturday, January 13, 2024 7:04 PM To: awesome-panel/panel-modal @.> Cc: peterlee18 @.>; Author @.> Subject: Re: [awesome-panel/panel-modal] Change name & tip text (Issue #2)

Thanks for the nice feedback.

You can achieve what you are after by creating custom buttons with a name="Browse" and description="Click to open file browser". The button should then trigger an opening of the Modal when clicked.

— Reply to this email directly, view it on GitHub https://github.com/awesome-panel/panel-modal/issues/2#issuecomment-1890720303 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AXTVV6TYEDQEZ4UOA4BLECLYOLLARAVCNFSM6AAAAABBYV5E5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQG4ZDAMZQGM . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AXTVV6RRLJDEKCAHVOA5BUTYOLLARA5CNFSM6AAAAABBYV5E5KWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTQWINC6.gif Message ID: @. @.> >