-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement prompt #4698
implement prompt #4698
Conversation
scripts/core/prompt-modal.tsx
Outdated
this.props.onDone(this.state.value); | ||
this.props.closeModal(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you pass the state to closeModal
and just have one function? So in the usage it would be:
closeModal={(value) => { ...processing closeModal(); <-- coming from
showModal })
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since both functions are not exposed to the options interface it makes sense to me
scripts/core/prompt-modal.tsx
Outdated
position="top" | ||
visible | ||
onHide={this.props.closeModal} | ||
headerTemplate="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? From what I checked in UIF this is the interface for the prop headerTemplate?: JSX.Element | string;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to select only headerTemplate
as the row to comment on, my bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's how I understood it and only dropped headerTemplate
STT-63
A styled alternative to
window.prompt
.