Loading frontend/src/actionlog/ToolAction/components/Form2.tsx +19 −17 Original line number Diff line number Diff line import { Icon, InputGroup } from '@blueprintjs/core' import { Button, ControlGroup, FormGroup, Icon, InputGroup } from '@blueprintjs/core' import { css } from '@emotion/css' import useApolloClient from '@inject/graphql/client/useApolloClient' import { Tool } from '@inject/graphql/fragments/Tool.generated' Loading @@ -23,6 +23,7 @@ const message = css` right: 0; background-color: white; border-top: 1px solid rgba(0, 0, 0, 0.2); border-radius: 0.5rem; .bp5-dark & { background-color: #2f343c; border-top-color: rgba(255, 255, 255, 0.2); Loading Loading @@ -76,9 +77,6 @@ const FormTool2: FC<{ }) selectedTool(null) } const handleEnter: KeyboardEventHandler<HTMLInputElement> = e => { if (e.key === 'Enter') mutateData() } if (toolFrag) { return ( Loading @@ -92,20 +90,24 @@ const FormTool2: FC<{ textAlign: 'center', }} > <Icon icon='signal-search' size={32} style={{ margin: 'auto' }} /> <Icon icon='sensor' size={32} style={{ margin: 'auto' }} /> </div> <div className={wrapper}> <div>{toolFrag.tooltipDescription}</div> <form className={wrapper} onSubmit={() => mutateData()}> <span>{toolFrag.tooltipDescription}</span> <ControlGroup fill style={{height: '4rem'}}> <InputGroup placeholder={toolFrag.hint || 'Argument'} inputRef={inp => { inputRef.current = inp }} fill height='4rem' onKeyDown={handleEnter} style={{height: '4rem'}} /> </div> <Button type="submit" rightIcon="send-message"> Send </Button> </ControlGroup> </form> </div> ) } else { Loading Loading
frontend/src/actionlog/ToolAction/components/Form2.tsx +19 −17 Original line number Diff line number Diff line import { Icon, InputGroup } from '@blueprintjs/core' import { Button, ControlGroup, FormGroup, Icon, InputGroup } from '@blueprintjs/core' import { css } from '@emotion/css' import useApolloClient from '@inject/graphql/client/useApolloClient' import { Tool } from '@inject/graphql/fragments/Tool.generated' Loading @@ -23,6 +23,7 @@ const message = css` right: 0; background-color: white; border-top: 1px solid rgba(0, 0, 0, 0.2); border-radius: 0.5rem; .bp5-dark & { background-color: #2f343c; border-top-color: rgba(255, 255, 255, 0.2); Loading Loading @@ -76,9 +77,6 @@ const FormTool2: FC<{ }) selectedTool(null) } const handleEnter: KeyboardEventHandler<HTMLInputElement> = e => { if (e.key === 'Enter') mutateData() } if (toolFrag) { return ( Loading @@ -92,20 +90,24 @@ const FormTool2: FC<{ textAlign: 'center', }} > <Icon icon='signal-search' size={32} style={{ margin: 'auto' }} /> <Icon icon='sensor' size={32} style={{ margin: 'auto' }} /> </div> <div className={wrapper}> <div>{toolFrag.tooltipDescription}</div> <form className={wrapper} onSubmit={() => mutateData()}> <span>{toolFrag.tooltipDescription}</span> <ControlGroup fill style={{height: '4rem'}}> <InputGroup placeholder={toolFrag.hint || 'Argument'} inputRef={inp => { inputRef.current = inp }} fill height='4rem' onKeyDown={handleEnter} style={{height: '4rem'}} /> </div> <Button type="submit" rightIcon="send-message"> Send </Button> </ControlGroup> </form> </div> ) } else { Loading