Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32768855
edit-setting-button.react.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
edit-setting-button.react.js
View Options
// @flow
import
*
as
React
from
'react'
;
import
{
TouchableOpacity
,
StyleSheet
,
Platform
}
from
'react-native'
;
import
{
useColors
}
from
'../themes/colors'
;
import
type
{
TextStyle
}
from
'../types/styles'
;
import
SWMansionIcon
from
'./swmansion-icon.react'
;
type
Props
=
{
+
onPress
:
()
=>
void
,
+
canChangeSettings
:
boolean
,
+
style
?:
TextStyle
,
};
function
EditSettingButton
(
props
:
Props
)
:
React
.
Node
{
const
colors
=
useColors
();
if
(
!
props
.
canChangeSettings
)
{
return
null
;
}
const
appliedStyles
=
[
styles
.
editIcon
];
if
(
props
.
style
)
{
appliedStyles
.
push
(
props
.
style
);
}
const
{
modalForegroundSecondaryLabel
}
=
colors
;
return
(
<
TouchableOpacity
onPress
=
{
props
.
onPress
}
>
<
SWMansionIcon
name
=
"edit-1"
size
=
{
20
}
style
=
{
appliedStyles
}
color
=
{
modalForegroundSecondaryLabel
}
/>
<
/TouchableOpacity>
);
}
const
styles
=
StyleSheet
.
create
({
editIcon
:
{
paddingLeft
:
10
,
paddingTop
:
Platform
.
select
({
android
:
1
,
default
:
0
}),
textAlign
:
'right'
,
},
});
export
default
EditSettingButton
;
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Fri, Jan 9, 12:59 PM (21 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5870417
Default Alt Text
edit-setting-button.react.js (1 KB)
Attached To
Mode
rCOMM Comm
Attached
Detach File
Event Timeline
Log In to Comment