Skip to content

Commit

Permalink
VisitableView: expose style property (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
pklatka authored Apr 19, 2024
1 parent 12bf2a6 commit d2e571f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/turbo/src/VisitableView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ import React, {
useMemo,
Component,
} from 'react';
import { NativeMethods, NativeSyntheticEvent, StyleSheet } from 'react-native';
import {
NativeMethods,
NativeSyntheticEvent,
StyleSheet,
ViewStyle,
} from 'react-native';

import RNVisitableView, {
RNVisitableViewProps,
Expand Down Expand Up @@ -40,6 +45,7 @@ import { nextEventLoopTick } from './utils/nextEventLoopTick';
export interface Props {
url: string;
sessionHandle?: string;
style?: ViewStyle;
applicationNameForUserAgent?: string;
stradaComponents?: StradaComponent[];
pullToRefreshEnabled?: boolean;
Expand Down Expand Up @@ -68,6 +74,7 @@ const VisitableView = React.forwardRef<RefObject, React.PropsWithRef<Props>>(
const {
url,
sessionHandle = 'Default',
style = styles.container,
applicationNameForUserAgent,
stradaComponents,
pullToRefreshEnabled = true,
Expand Down Expand Up @@ -204,14 +211,14 @@ const VisitableView = React.forwardRef<RefObject, React.PropsWithRef<Props>>(
ref={visitableViewRef}
url={props.url}
sessionHandle={sessionHandle}
style={style}
applicationNameForUserAgent={resolvedApplicationNameForUserAgent}
pullToRefreshEnabled={pullToRefreshEnabled}
onError={onErrorCombinedHandlers}
onVisitProposal={handleVisitProposal}
onMessage={handleOnMessage}
onOpenExternalUrl={handleOnOpenExternalUrl}
onLoad={handleOnLoad}
style={styles.container}
onWebAlert={handleAlert}
onWebConfirm={handleConfirm}
onFormSubmissionStarted={handleOnFormSubmissionStarted}
Expand Down

0 comments on commit d2e571f

Please sign in to comment.