diff --git a/src/components/Snackbar.tsx b/src/components/Snackbar.tsx index 2e1d645772..137a69ae82 100644 --- a/src/components/Snackbar.tsx +++ b/src/components/Snackbar.tsx @@ -80,6 +80,10 @@ export type Props = $Omit, 'mode'> & { * Style for the wrapper of the snackbar */ wrapperStyle?: StyleProp; + /** + * Style for the content of the snackbar + */ + contentStyle?: StyleProp; style?: Animated.WithAnimatedValue>; ref?: React.RefObject; /** @@ -152,8 +156,9 @@ const Snackbar = ({ onDismiss, children, elevation = 2, - wrapperStyle, style, + wrapperStyle, + contentStyle, theme: themeOverrides, maxFontSizeMultiplier, rippleColor, @@ -279,7 +284,7 @@ const Snackbar = ({ } return ( - + {/* View is added to allow multiple lines support for Text component as children */} {children} diff --git a/src/components/__tests__/__snapshots__/Snackbar.test.tsx.snap b/src/components/__tests__/__snapshots__/Snackbar.test.tsx.snap index b316fa998a..463d8f5cb3 100644 --- a/src/components/__tests__/__snapshots__/Snackbar.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/Snackbar.test.tsx.snap @@ -69,11 +69,14 @@ exports[`renders snackbar with Text as a child 1`] = ` > @@ -154,11 +157,14 @@ exports[`renders snackbar with View & Text as a child 1`] = ` >