File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
explorer/components/DrawingPage Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,18 @@ import React from 'react'
2
2
import styled from 'styled-components'
3
3
import { navBarItemStyles } from './styles'
4
4
5
+ type Action = {
6
+ title : string
7
+ onClick : ( ) => void
8
+ }
9
+
5
10
export const ActionsMenu : React . FC = ( ) => {
6
11
const [ isActive , setIsActive ] = React . useState ( false )
7
12
13
+ const actions : Action [ ] = [ ]
14
+
15
+ if ( ! actions . length ) return null
16
+
8
17
return (
9
18
< Container title = 'More Actions' onClick = { ( ) => setIsActive ( ! isActive ) } >
10
19
< svg viewBox = "0 0 24 24" >
@@ -13,7 +22,9 @@ export const ActionsMenu: React.FC = () => {
13
22
< circle cx = "19" cy = "12" r = "2" />
14
23
</ svg >
15
24
< Popup isActive = { isActive } >
16
- < Item > No actions available</ Item >
25
+ { actions . map ( action => (
26
+ < Item > < a onClick = { action . onClick } > { action . title } </ a > </ Item >
27
+ ) ) }
17
28
</ Popup >
18
29
</ Container >
19
30
)
You can’t perform that action at this time.
0 commit comments