Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL KI Ganjil 2021 2022
Clicks - Ecosystem Business
clicks-frontend
Commits
40ba293b
Commit
40ba293b
authored
Sep 30, 2021
by
angelin depthios
Committed by
Bagus Prabowo
Sep 30, 2021
Browse files
FEAT: create Plain button component
parent
3b17148f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/button/PlainButton.tsx
0 → 100644
View file @
40ba293b
import
{
MaterialIcons
}
from
"
@expo/vector-icons
"
;
import
React
from
"
react
"
;
import
{
Text
,
StyleSheet
,
TouchableOpacity
,
View
}
from
"
react-native
"
;
import
Colors
from
"
../../constants/Colors
"
;
type
props
=
{
text
:
string
;
onPress
:
()
=>
void
;
};
const
PlainButton
=
({
text
,
onPress
}:
props
)
=>
{
return
(
<
View
>
<
TouchableOpacity
style
=
{
styles
.
button
}
onPress
=
{
()
=>
onPress
()
}
>
<
View
style
=
{
styles
.
textContainter
}
>
<
Text
style
=
{
styles
.
texts
}
>
{
text
}
</
Text
>
</
View
>
<
View
style
=
{
styles
.
iconContainer
}
>
<
MaterialIcons
style
=
{
{
justifyContent
:
"
center
"
,
}
}
name
=
"keyboard-arrow-right"
size
=
{
24
}
color
=
"#666666"
/>
</
View
>
</
TouchableOpacity
>
</
View
>
);
};
export
default
PlainButton
;
const
styles
=
StyleSheet
.
create
({
button
:
{
width
:
363
,
borderRadius
:
8
,
elevation
:
4
,
flexDirection
:
"
row
"
,
justifyContent
:
"
space-between
"
,
alignItems
:
"
center
"
,
backgroundColor
:
Colors
.
background
,
},
textContainter
:
{
flex
:
1
,
marginRight
:
25
,
marginLeft
:
8
,
marginVertical
:
8
,
},
iconContainer
:
{
marginRight
:
16
,
marginVertical
:
23
,
},
texts
:
{
fontWeight
:
"
300
"
,
width
:
307
,
fontSize
:
16
,
textAlign
:
"
left
"
,
textAlignVertical
:
"
center
"
,
color
:
"
#666666
"
,
},
});
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment