a tool for shared writing and social publishing

pass attrs to highlight button

+3 -1
+2 -1
components/Toolbar/TextDecorationButton.tsx
··· 9 9 10 10 export function TextDecorationButton(props: { 11 11 mark: MarkType; 12 + attrs?: any; 12 13 icon: React.ReactNode; 13 14 }) { 14 15 let focusedBlock = useUIState((s) => s.focusedBlock); ··· 36 37 active={hasMark} 37 38 onClick={(e) => { 38 39 e.preventDefault(); 39 - toggleMarkInFocusedBlock(props.mark); 40 + toggleMarkInFocusedBlock(props.mark, props.attrs); 40 41 }} 41 42 > 42 43 {props.icon}
+1
components/Toolbar/index.tsx
··· 117 117 /> 118 118 <div className="flex items-center gap-1"> 119 119 <TextDecorationButton 120 + attrs={{ color: lastUsedHighlight }} 120 121 mark={schema.marks.highlight} 121 122 icon={<HighlightSmall />} 122 123 />