File tree Expand file tree Collapse file tree 3 files changed +42
-6
lines changed
Expand file tree Collapse file tree 3 files changed +42
-6
lines changed Original file line number Diff line number Diff line change 1+ import React from 'react'
2+ import { StyleSheet , Pressable } from 'react-native'
3+ import Ionicons from 'react-native-vector-icons/Ionicons'
4+ import { PRIMARY , WHITE } from '../../constants'
5+
6+ const styles = StyleSheet . create ( {
7+ container : {
8+ height : 52 ,
9+ width : 52 ,
10+ backgroundColor : PRIMARY ,
11+ borderRadius : 100
12+ } ,
13+ iconStyle : {
14+ alignItems : 'center' ,
15+ justifyContent : 'center'
16+ }
17+ } )
18+
19+ function ButtonPhoto ( ) {
20+ const { container, iconStyle } = styles
21+
22+ return (
23+ < Pressable
24+ style = { ( { pressed } ) => [
25+ {
26+ opacity : pressed ? 0.9 : 1
27+ } ,
28+ container ,
29+ iconStyle
30+ ] }
31+ >
32+ < Ionicons name = "camera" size = { 30 } color = { WHITE } />
33+ </ Pressable >
34+ )
35+ }
36+
37+ export { ButtonPhoto }
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ export * from './Button'
22export * from './Space'
33export * from './Text'
44export * from './Switch'
5- export * from './Labels'
5+ export * from './Labels'
6+ export * from './ButtonPhoto'
Original file line number Diff line number Diff line change 11import React , { useState } from 'react'
22import { StyleSheet , View } from 'react-native'
33import { DARK , WHITE } from './constants'
4- import { Space , Labels , Text } from './components'
4+ import { Space , Text , ButtonPhoto } from './components'
55
66const styles = StyleSheet . create ( {
77 container : {
@@ -24,11 +24,9 @@ export default function App({}) {
2424
2525 return (
2626 < View style = { container } >
27- < Text title = "Labels " h0 />
27+ < Text title = "ButtonPhoto " h0 />
2828 < Space height = { 15 } />
29- < Labels isSaleOrNew = { true } title = { '90%' } />
30- < Space height = { 15 } />
31- < Labels isSaleOrNew = { false } title = { '90%' } />
29+ < ButtonPhoto />
3230 </ View >
3331 )
3432}
You can’t perform that action at this time.
0 commit comments