Don't add type to div buttons

This commit is contained in:
Dustin Brett 2023-11-18 09:04:28 -08:00
parent ff67c66f70
commit 7709139e63

View File

@ -8,9 +8,9 @@ const onKeyDown: React.KeyboardEventHandler<HTMLButtonElement> = (event) => {
if (!(event.target instanceof HTMLTextAreaElement)) event.preventDefault();
};
const Button = styled.button.attrs(() => ({
const Button = styled.button.attrs(({ as }) => ({
onKeyDown,
type: "button",
type: !as || as === "button" ? "button" : undefined,
}))<ButtonProps>`
background-color: transparent;
font-family: inherit;