File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change
1
+ (ns components.shortcuts-scenes
2
+ (:require
3
+ [portfolio.reagent-18 :refer-macros [defscene ]]
4
+ [renderer.ui :as ui]
5
+ [renderer.utils.keyboard :as keyb]))
6
+
7
+ (defscene single-shortcut
8
+ :title " Single shortcut"
9
+ [:div.toolbar.bg-primary.h-10.p-2
10
+ [ui/shortcuts [[{:keyCode (keyb/key-codes " P" )
11
+ :ctrlKey true
12
+ :shiftKey true }]]]])
13
+
14
+ (defscene multiple-shortcuts
15
+ :title " Multiple shortcuts"
16
+ [:div.toolbar.bg-primary.h-10.p-2
17
+ [ui/shortcuts [[{:keyCode (keyb/key-codes " P" )
18
+ :ctrlKey true
19
+ :shiftKey true }]
20
+ [{:keyCode (keyb/key-codes " ONE" )
21
+ :altKey true }]]]])
22
+
23
+ (defscene no-shortcuts
24
+ :title " No shortcuts"
25
+ [:div.toolbar.bg-primary.h-10.p-2
26
+ [ui/shortcuts []]])
Original file line number Diff line number Diff line change 1
1
(ns portfolio
2
2
(:require [components.button-scenes]
3
3
[components.icon-scenes]
4
+ [components.shortcuts-scenes]
4
5
[components.slider-scenes]
5
6
[components.switch-scenes]
6
7
[portfolio.ui :as ui]
Original file line number Diff line number Diff line change 1
1
(ns renderer.ui
2
2
" A collection of stateless reusable ui components.
3
- Avoid using subscriptions as much as possible to keep the components pure."
3
+ Avoid using subscriptions to keep the components pure."
4
4
(:require
5
5
[" @radix-ui/react-context-menu" :as ContextMenu]
6
6
[" @radix-ui/react-dropdown-menu" :as DropdownMenu]
You can’t perform that action at this time.
0 commit comments