Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32768889
panel-header.react.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
774 B
Referenced Files
None
Subscribers
None
panel-header.react.js
View Options
// @flow
import
*
as
React
from
'react'
;
import
css
from
'./panel-header.css'
;
import
AddButton
from
'../components/add-button.react.js'
;
type
Props
=
{
+
headerLabel
:
string
,
+
onClickAddButton
?:
()
=>
mixed
,
};
function
PanelHeader
(
props
:
Props
)
:
React
.
Node
{
const
{
headerLabel
,
onClickAddButton
}
=
props
;
const
addButton
=
React
.
useMemo
(()
=>
{
if
(
!
onClickAddButton
)
{
return
null
;
}
return
<
AddButton
onClick
=
{
onClickAddButton
}
/>
;
},
[
onClickAddButton
]);
const
panelHeader
=
React
.
useMemo
(
()
=>
(
<
div
className
=
{
css
.
container
}
>
<
div
className
=
{
css
.
headerLabel
}
>
{
headerLabel
}
<
/div>
{
addButton
}
<
/div>
),
[
addButton
,
headerLabel
],
);
return
panelHeader
;
}
export
default
PanelHeader
;
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Fri, Jan 9, 1:22 PM (21 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5891183
Default Alt Text
panel-header.react.js (774 B)
Attached To
Mode
rCOMM Comm
Attached
Detach File
Event Timeline
Log In to Comment