= {
key,
tnode,
@@ -59,8 +61,8 @@ const TBlockRenderer = ({
...tnode.styles.nativeBlockFlow,
...tnode.styles.nativeBlockRet
}),
+ viewProps,
textProps: {},
- viewProps: {},
type: 'text',
hasAnchorAncestor,
TDefaultRenderer: TDefaultBlockRenderer,
diff --git a/packages/render-html/src/context/SharedPropsContext.ts b/packages/render-html/src/context/SharedPropsContext.ts
index 24f886f5d..b978444b7 100644
--- a/packages/render-html/src/context/SharedPropsContext.ts
+++ b/packages/render-html/src/context/SharedPropsContext.ts
@@ -43,6 +43,10 @@ export function useDefaultTextProps(): TextProps {
return useSharedProps().defaultTextProps;
}
+export function useDefaultViewProps(): TextProps {
+ return useSharedProps().defaultViewProps;
+}
+
export function useComputeMaxWidthForTag(tagName: string) {
const { computeEmbeddedMaxWidth } = useSharedProps();
return useCallback(
diff --git a/packages/render-html/src/shared-types.ts b/packages/render-html/src/shared-types.ts
index de598ef61..b6493c9fd 100644
--- a/packages/render-html/src/shared-types.ts
+++ b/packages/render-html/src/shared-types.ts
@@ -93,6 +93,12 @@ export interface RenderHTMLPassedProps {
* @remarks "style" will be ignored. Use `baseStyle` instead.
*/
defaultTextProps?: Omit;
+ /**
+ * Default props for View elements in the render tree.
+ *
+ * @remarks "style" will be ignored. Use `baseStyle` instead.
+ */
+ defaultViewProps?: Omit;
/**
* Default props for WebView elements in the render tree used by plugins.
*/