mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-18 06:50:31 +02:00
feat: Add separators on context menu (#2659)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dwelle <luzar.david@gmail.com> Co-authored-by: Lipis <lipiridis@gmail.com>
This commit is contained in:
17
src/actions/actionToggleStats.tsx
Normal file
17
src/actions/actionToggleStats.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { register } from "./register";
|
||||
|
||||
export const actionToggleStats = register({
|
||||
name: "stats",
|
||||
perform(elements, appState) {
|
||||
this.checked = !this.checked;
|
||||
return {
|
||||
appState: {
|
||||
...appState,
|
||||
showStats: !appState.showStats,
|
||||
},
|
||||
commitToHistory: false,
|
||||
};
|
||||
},
|
||||
checked: false,
|
||||
contextItemLabel: "stats.title",
|
||||
});
|
Reference in New Issue
Block a user