import React from 'react'; import { StyleSheet, View, ViewStyle } from 'react-native'; import { useStyles } from '../../hooks'; import { ComponentStyleProp, LLComponentStyleFn } from '../../types'; import { LLWidgetActionInfo, LLWidgetActionInfoProps, } from './LLWidgetActionInfo'; import { LLWidgetSponsor, LLWidgetSponsorProps } from './LLWidgetSponsor'; export type LLWidgetFooterStyles = { container: ViewStyle; }; export type LLWidgetFooterProps = ComponentStyleProp & { widgetId: string; ActionInfoComponent?: typeof LLWidgetActionInfo; ActionInfoComponentStyles?: LLWidgetActionInfoProps['styles']; SponsorComponent?: typeof LLWidgetSponsor; SponsorComponentStyles?: LLWidgetSponsorProps['styles']; }; export function LLWidgetFooter({ widgetId, styles: stylesProp, ActionInfoComponent = LLWidgetActionInfo, ActionInfoComponentStyles, SponsorComponent = LLWidgetSponsor, SponsorComponentStyles, }: LLWidgetFooterProps) { const footerStyles = useStyles({ componentStylesFn: getWidgetFooterStyles, stylesProp, }); return ( ); } const getWidgetFooterStyles: LLComponentStyleFn = ({ theme, }) => StyleSheet.create({ container: { display: 'flex', flexDirection: 'column', }, });