Closed davemeyer closed 4 years ago
yeah the problem is that the top level Modal
is the one with the "optional" props. so we would need a ModalWithInput
component and a ModalWIthoutInput
component. but as far as i know there isn't a way to limit the types of children that go into the components. so nothing would prevent me from adding a Input
to my ModalWithoutInput
component. just thoughts.
isn't a way to limit the types of children that go into the components. so nothing would prevent me from adding a Input to my ModalWithoutInput component
ah yes... we might be able to do something with https://github.com/asynchronous-dev/react-chat-renderer/blob/master/src/components/ContainerProps.ts but yeah in general i don't think JSX works this way. will have to do some research into babel/typescript
closes: #25 adds a
Input
block level component as well as aPlainTextInput
element component.also some additions to
Modal
to support the optionalsubmit
andclose
props that are REQUIRED if you have any input options. maybe we should just always require those?