a tool for shared writing and social publishing

fwd refs on action Button

+8 -5
+8 -5
components/ActionBar/ActionButton.tsx
··· 7 7 8 8 type ButtonProps = Omit<JSX.IntrinsicElements["button"], "content">; 9 9 10 - export const ActionButton = ( 11 - _props: ButtonProps & { 10 + export const ActionButton = forwardRef< 11 + HTMLButtonElement, 12 + ButtonProps & { 12 13 id?: string; 13 14 icon: React.ReactNode; 14 15 label: React.ReactNode; ··· 19 20 subtext?: string; 20 21 labelOnMobile?: boolean; 21 22 z?: boolean; 22 - }, 23 - ) => { 23 + } 24 + >((_props, ref) => { 24 25 let { 25 26 id, 26 27 icon, ··· 50 51 return ( 51 52 <button 52 53 {...buttonProps} 54 + ref={ref} 53 55 className={` 54 56 actionButton relative font-bold 55 57 rounded-md border ··· 81 83 </div> 82 84 </button> 83 85 ); 84 - }; 86 + }); 87 + ActionButton.displayName = "ActionButton";