diff --git a/apps/mobile/src/components/ActionSheetComponent/BouncingView.js b/apps/mobile/src/components/ActionSheetComponent/BouncingView.js index d5828495a..d2cddfc81 100644 --- a/apps/mobile/src/components/ActionSheetComponent/BouncingView.js +++ b/apps/mobile/src/components/ActionSheetComponent/BouncingView.js @@ -1,30 +1,40 @@ -import React, { useEffect } from 'react'; -import Animated, { Easing, timing } from 'react-native-reanimated'; +import React, {useEffect} from 'react'; +import Animated, {Easing, timing} from 'react-native-reanimated'; + +export const BouncingView = ({ + children, + style, + duration = 600, + animated = true +}) => { + const scale = Animated.useValue(!animated ? 1 : 0.9); -export const BouncingView = ({children,style,duration=600}) => { - const scale = Animated.useValue(0.9); - useEffect(() => { + if (!animated) return; scale.setValue(0.9); timing(scale, { toValue: 1, - duration:duration, + duration: duration, easing: Easing.elastic(1) }).start(); return () => { + if (!animated) return; scale.setValue(0.9); - } - },[]) + }; + }, []); return ( + style={[ + { + transform: [ + { + scale: !animated ? 1 : scale + } + ] + }, + style + ]}> {children} ); diff --git a/apps/mobile/src/components/Announcements/body.js b/apps/mobile/src/components/Announcements/body.js new file mode 100644 index 000000000..3fef67f8d --- /dev/null +++ b/apps/mobile/src/components/Announcements/body.js @@ -0,0 +1,20 @@ +import React from 'react'; +import { useTracked } from '../../provider'; +import Paragraph from '../Typography/Paragraph'; +import { getStyle } from './functions'; + + +export const Body = ({text, style = {}}) => { + const [state] = useTracked(); + const colors = state.colors; + + return ( + + {text} + + ); +}; \ No newline at end of file diff --git a/apps/mobile/src/components/Announcements/cta.js b/apps/mobile/src/components/Announcements/cta.js new file mode 100644 index 000000000..599bb8f0e --- /dev/null +++ b/apps/mobile/src/components/Announcements/cta.js @@ -0,0 +1,31 @@ +import React from 'react'; +import { View } from 'react-native'; +import { useTracked } from '../../provider'; +import { Button } from '../Button'; +import { getStyle } from './functions'; + +export const Cta = ({actions, style = {}}) => { + const [state] = useTracked(); + const colors = state.colors; + return ( + + {actions.map((item, index) => ( +