Open History to see the last commit
1import { forwardRef } from 'react'
2β
3export const SaveButton = forwardRef<
4 HTMLButtonElement,
5 React.ButtonHTMLAttributes<HTMLButtonElement>
6>((props, ref) => {
7 return (
8 <button
9 ref={ref}
10 // this makes it so the button takes focus on clicks in safari I can't
11 // remember if this is the proper workaround or not, it's been a while!
12 // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
13 // https://bugs.webkit.org/show_bug.cgi?id=22261
14 tabIndex={0}
15 {...props}
16 className="text-sm rounded-lg text-left p-2 font-medium text-white bg-blue-500"
17 />
18 )
19})