Skip to content

Commit

Permalink
Optional onClick
Browse files Browse the repository at this point in the history
  • Loading branch information
dianaPrahoveanu-SL committed Nov 13, 2024
1 parent db8a0bc commit ad3768b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface ButtonProps {
text?: string;
icon?: string;
disabled?: boolean;
onClick: () => void;
onClick?: () => void;
}

export const Button = ({ text, icon, disabled, onClick }: ButtonProps) => {
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/components/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@ export const Input = ({ sendMessage, waiting }: InputProps) => {
<img src={UploadIcon} />
</button>
</div>
<Button
icon={RightArrowIcon}
disabled={sendDisabled}
onClick={() => onSend}
/>
<Button icon={RightArrowIcon} disabled={sendDisabled} />
</form>
<Suggestions loadPrompt={setUserInput} waiting={waiting} />
</>
Expand Down

0 comments on commit ad3768b

Please sign in to comment.