diff --git a/example/src/Examples/SurfaceExample.tsx b/example/src/Examples/SurfaceExample.tsx
index 27bbfce866..eb2ac6a317 100644
--- a/example/src/Examples/SurfaceExample.tsx
+++ b/example/src/Examples/SurfaceExample.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
-import { StyleSheet } from 'react-native';
+import { StyleSheet, View } from 'react-native';
-import { MD3Elevation, Surface, Text } from 'react-native-paper';
+import { MD3Elevation, Surface, Text, MD3Colors } from 'react-native-paper';
import { useExampleTheme } from '..';
import { isWeb } from '../../utils';
@@ -31,6 +31,23 @@ const SurfaceExample = () => {
))}
+
+
+
+ Left
+
+
+ Right
+
+
+
+
+ Top
+
+
+ Bottom
+
+
);
};
@@ -61,6 +78,37 @@ const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
},
+
+ horizontalSurfacesContainer: {
+ flexDirection: 'row',
+ justifyContent: 'space-between',
+ width: '100%',
+ marginBottom: 20,
+ borderColor: MD3Colors.tertiary50,
+ padding: 10,
+ borderWidth: 1,
+ },
+ horizontalSurface: {
+ width: '48%',
+ },
+
+ verticalSurfacesContainer: {
+ height: 400,
+ justifyContent: 'space-between',
+ width: '100%',
+ marginBottom: 100,
+ borderColor: MD3Colors.tertiary50,
+ padding: 10,
+ borderWidth: 1,
+ },
+ verticalSurface: {
+ height: '48%',
+ justifyContent: 'center',
+ },
+
+ centerText: {
+ textAlign: 'center',
+ },
});
export default SurfaceExample;
diff --git a/src/components/FAB/FAB.tsx b/src/components/FAB/FAB.tsx
index 7d067740f5..050fbaa640 100644
--- a/src/components/FAB/FAB.tsx
+++ b/src/components/FAB/FAB.tsx
@@ -266,7 +266,6 @@ const FAB = forwardRef(
},
],
},
- styles.container,
!isV3 && styles.elevated,
!isV3 && disabled && styles.disabled,
style,
@@ -286,6 +285,7 @@ const FAB = forwardRef(
accessibilityRole="button"
accessibilityState={newAccessibilityState}
testID={testID}
+ style={{ borderRadius }}
>
& {
/**
@@ -28,7 +32,7 @@ export type Props = React.ComponentPropsWithRef & {
* Note: In version 2 the `elevation` prop was accepted via `style` prop i.e. `style={{ elevation: 4 }}`.
* It's no longer supported with theme version 3 and you should use `elevation` property instead.
*/
- elevation?: 0 | 1 | 2 | 3 | 4 | 5 | Animated.Value;
+ elevation?: Elevation;
/**
* @optional
*/
@@ -64,6 +68,145 @@ const MD2Surface = forwardRef(
}
);
+const shadowColor = '#000';
+const iOSShadowOutputRanges = [
+ {
+ shadowOpacity: 0.15,
+ height: [0, 1, 2, 4, 6, 8],
+ shadowRadius: [0, 3, 6, 8, 10, 12],
+ },
+ {
+ shadowOpacity: 0.3,
+ height: [0, 1, 1, 1, 2, 4],
+ shadowRadius: [0, 1, 2, 3, 3, 4],
+ },
+];
+const inputRange = [0, 1, 2, 3, 4, 5];
+function getStyleForShadowLayer(
+ elevation: Elevation,
+ layer: 0 | 1
+): Animated.WithAnimatedValue {
+ if (isAnimatedValue(elevation)) {
+ return {
+ shadowColor,
+ shadowOpacity: elevation.interpolate({
+ inputRange: [0, 1],
+ outputRange: [0, iOSShadowOutputRanges[layer].shadowOpacity],
+ extrapolate: 'clamp',
+ }),
+ shadowOffset: {
+ width: 0,
+ height: elevation.interpolate({
+ inputRange,
+ outputRange: iOSShadowOutputRanges[layer].height,
+ }),
+ },
+ shadowRadius: elevation.interpolate({
+ inputRange,
+ outputRange: iOSShadowOutputRanges[layer].shadowRadius,
+ }),
+ };
+ }
+
+ return {
+ shadowColor,
+ shadowOpacity: elevation ? iOSShadowOutputRanges[layer].shadowOpacity : 0,
+ shadowOffset: {
+ width: 0,
+ height: iOSShadowOutputRanges[layer].height[elevation],
+ },
+ shadowRadius: iOSShadowOutputRanges[layer].shadowRadius[elevation],
+ };
+}
+
+const SurfaceIOS = forwardRef<
+ View,
+ Omit & {
+ elevation: Elevation;
+ backgroundColor?: string | Animated.AnimatedInterpolation;
+ }
+>(({ elevation, style, backgroundColor, testID, children, ...props }, ref) => {
+ const [outerLayerViewStyles, innerLayerViewStyles] = React.useMemo(() => {
+ const {
+ position,
+ alignSelf,
+ top,
+ left,
+ right,
+ bottom,
+ start,
+ end,
+ flex,
+ backgroundColor: backgroundColorStyle,
+ width,
+ height,
+ transform,
+ opacity,
+ ...restStyle
+ } = (StyleSheet.flatten(style) || {}) as ViewStyle;
+
+ const [filteredStyles, marginStyles, borderRadiusStyles] = splitStyles(
+ restStyle,
+ (style) => style.startsWith('margin'),
+ (style) => style.startsWith('border') && style.endsWith('Radius')
+ );
+
+ if (
+ process.env.NODE_ENV !== 'production' &&
+ filteredStyles.overflow === 'hidden' &&
+ elevation !== 0
+ ) {
+ console.warn(
+ 'When setting overflow to hidden on Surface the shadow will not be displayed correctly. Wrap the content of your component in a separate View with the overflow style.'
+ );
+ }
+
+ const bgColor = backgroundColorStyle || backgroundColor;
+
+ const outerLayerViewStyles = {
+ ...getStyleForShadowLayer(elevation, 0),
+ ...marginStyles,
+ ...borderRadiusStyles,
+ position,
+ alignSelf,
+ top,
+ right,
+ bottom,
+ left,
+ start,
+ end,
+ flex,
+ width,
+ height,
+ transform,
+ opacity,
+ backgroundColor: bgColor,
+ };
+
+ const innerLayerViewStyles = {
+ ...getStyleForShadowLayer(elevation, 1),
+ ...filteredStyles,
+ ...borderRadiusStyles,
+ flex: height ? 1 : undefined,
+ backgroundColor: bgColor,
+ };
+
+ return [outerLayerViewStyles, innerLayerViewStyles];
+ }, [style, elevation, backgroundColor]);
+
+ return (
+
+
+ {children}
+
+
+ );
+});
+
/**
* Surface is a basic container that can give depth to an element with elevation shadow.
* On dark theme with `adaptive` mode, surface is constructed by also placing a semi-transparent white overlay over a component surface.
@@ -204,122 +347,16 @@ const Surface = forwardRef(
);
}
- const iOSShadowOutputRanges = [
- {
- shadowOpacity: 0.15,
- height: [0, 1, 2, 4, 6, 8],
- shadowRadius: [0, 3, 6, 8, 10, 12],
- },
- {
- shadowOpacity: 0.3,
- height: [0, 1, 1, 1, 2, 4],
- shadowRadius: [0, 1, 2, 3, 3, 4],
- },
- ];
-
- const shadowColor = '#000';
-
- const {
- position,
- alignSelf,
- top,
- left,
- right,
- bottom,
- start,
- end,
- flex,
- ...restStyle
- } = (StyleSheet.flatten(style) || {}) as ViewStyle;
-
- const absoluteStyles = {
- position,
- alignSelf,
- top,
- right,
- bottom,
- left,
- start,
- end,
- };
-
- const sharedStyle = [{ backgroundColor, flex }, restStyle];
-
- const innerLayerViewStyles = [{ flex }];
-
- const outerLayerViewStyles = [absoluteStyles, innerLayerViewStyles];
-
- if (isAnimatedValue(elevation)) {
- const inputRange = [0, 1, 2, 3, 4, 5];
-
- const getStyleForAnimatedShadowLayer = (layer: 0 | 1) => {
- return {
- shadowColor,
- shadowOpacity: elevation.interpolate({
- inputRange: [0, 1],
- outputRange: [0, iOSShadowOutputRanges[layer].shadowOpacity],
- extrapolate: 'clamp',
- }),
- shadowOffset: {
- width: 0,
- height: elevation.interpolate({
- inputRange,
- outputRange: iOSShadowOutputRanges[layer].height,
- }),
- },
- shadowRadius: elevation.interpolate({
- inputRange,
- outputRange: iOSShadowOutputRanges[layer].shadowRadius,
- }),
- };
- };
-
- return (
-
-
-
- {children}
-
-
-
- );
- }
-
- const getStyleForShadowLayer = (layer: 0 | 1) => {
- return {
- shadowColor,
- shadowOpacity: elevation
- ? iOSShadowOutputRanges[layer].shadowOpacity
- : 0,
- shadowOffset: {
- width: 0,
- height: iOSShadowOutputRanges[layer].height[elevation],
- },
- shadowRadius: iOSShadowOutputRanges[layer].shadowRadius[elevation],
- };
- };
-
return (
-
-
-
- {children}
-
-
-
+ {children}
+
);
}
);
diff --git a/src/components/__tests__/AnimatedFAB.test.tsx b/src/components/__tests__/AnimatedFAB.test.tsx
index 82fa5bc558..6d1e4cbc1f 100644
--- a/src/components/__tests__/AnimatedFAB.test.tsx
+++ b/src/components/__tests__/AnimatedFAB.test.tsx
@@ -79,7 +79,7 @@ it('animated value changes correctly', () => {
style={[{ transform: [{ scale: value }] }]}
/>
);
- expect(getByTestId('animated-fab-container')).toHaveStyle({
+ expect(getByTestId('animated-fab-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -91,7 +91,7 @@ it('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('animated-fab-container')).toHaveStyle({
+ expect(getByTestId('animated-fab-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/Appbar/Appbar.test.tsx b/src/components/__tests__/Appbar/Appbar.test.tsx
index 9c49d95e7c..9792db3410 100644
--- a/src/components/__tests__/Appbar/Appbar.test.tsx
+++ b/src/components/__tests__/Appbar/Appbar.test.tsx
@@ -384,7 +384,7 @@ describe('animated value changes correctly', () => {
);
- expect(getByTestId('appbar')).toHaveStyle({
+ expect(getByTestId('appbar-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -396,7 +396,7 @@ describe('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('appbar')).toHaveStyle({
+ expect(getByTestId('appbar-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
@@ -412,7 +412,7 @@ describe('animated value changes correctly', () => {
/>
);
- expect(getByTestId('appbar-action-container')).toHaveStyle({
+ expect(getByTestId('appbar-action-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -424,7 +424,7 @@ describe('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('appbar-action-container')).toHaveStyle({
+ expect(getByTestId('appbar-action-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
@@ -439,9 +439,11 @@ describe('animated value changes correctly', () => {
/>
);
- expect(getByTestId('appbar-back-action-container')).toHaveStyle({
- transform: [{ scale: 1 }],
- });
+ expect(getByTestId('appbar-back-action-container-outer-layer')).toHaveStyle(
+ {
+ transform: [{ scale: 1 }],
+ }
+ );
Animated.timing(value, {
toValue: 1.5,
@@ -451,9 +453,11 @@ describe('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('appbar-back-action-container')).toHaveStyle({
- transform: [{ scale: 1.5 }],
- });
+ expect(getByTestId('appbar-back-action-container-outer-layer')).toHaveStyle(
+ {
+ transform: [{ scale: 1.5 }],
+ }
+ );
});
it('header animated value changes correctly', () => {
@@ -468,7 +472,7 @@ describe('animated value changes correctly', () => {
);
- expect(getByTestId('appbar-header')).toHaveStyle({
+ expect(getByTestId('appbar-header-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -480,7 +484,7 @@ describe('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('appbar-header')).toHaveStyle({
+ expect(getByTestId('appbar-header-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/Appbar/__snapshots__/Appbar.test.tsx.snap b/src/components/__tests__/Appbar/__snapshots__/Appbar.test.tsx.snap
index 05d5fe84d5..c7d6c37c4e 100644
--- a/src/components/__tests__/Appbar/__snapshots__/Appbar.test.tsx.snap
+++ b/src/components/__tests__/Appbar/__snapshots__/Appbar.test.tsx.snap
@@ -6,10 +6,13 @@ exports[`Appbar does not pass any additional props to Searchbar 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(255, 251, 254, 1)",
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 64,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -21,6 +24,8 @@ exports[`Appbar does not pass any additional props to Searchbar 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="surface-outer-layer"
@@ -29,7 +34,15 @@ exports[`Appbar does not pass any additional props to Searchbar 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "alignItems": "center",
+ "backgroundColor": "rgba(255, 251, 254, 1)",
+ "flex": 1,
+ "flexDirection": "row",
+ "paddingBottom": undefined,
+ "paddingHorizontal": 4,
+ "paddingLeft": undefined,
+ "paddingRight": undefined,
+ "paddingTop": undefined,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -39,37 +52,47 @@ exports[`Appbar does not pass any additional props to Searchbar 1`] = `
"shadowRadius": 0,
}
}
- testID="surface-inner-layer"
+ testID="surface"
>
-
-
-
+
-
-
-
-
-
-
+ },
+ Object {
+ "backgroundColor": "transparent",
+ },
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
-
+
+
+
+
+ }
+ testID="icon-button-container-outer-layer"
+ >
-
-
-
+
-
-
-
-
-
-
+ },
+ Object {
+ "backgroundColor": "transparent",
+ },
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
@@ -475,10 +453,13 @@ exports[`Appbar passes additional props to AppbarBackAction, AppbarContent and A
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(255, 251, 254, 1)",
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 64,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -490,6 +471,8 @@ exports[`Appbar passes additional props to AppbarBackAction, AppbarContent and A
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="surface-outer-layer"
@@ -498,7 +481,15 @@ exports[`Appbar passes additional props to AppbarBackAction, AppbarContent and A
collapsable={false}
style={
Object {
- "flex": undefined,
+ "alignItems": "center",
+ "backgroundColor": "rgba(255, 251, 254, 1)",
+ "flex": 1,
+ "flexDirection": "row",
+ "paddingBottom": undefined,
+ "paddingHorizontal": 4,
+ "paddingLeft": undefined,
+ "paddingRight": undefined,
+ "paddingTop": undefined,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -508,37 +499,50 @@ exports[`Appbar passes additional props to AppbarBackAction, AppbarContent and A
"shadowRadius": 0,
}
}
- testID="surface-inner-layer"
+ testID="surface"
>
-
-
-
-
-
+ style={
+ Array [
+ Object {
+ "resizeMode": "contain",
+ },
+ Object {
+ "height": 21,
+ "tintColor": "rgba(28, 27, 31, 1)",
+ "width": 21,
+ },
+ ]
+ }
+ />
-
+
+
-
- Examples
-
-
+ false,
+ undefined,
+ ],
+ ]
+ }
+ testID="appbar-content-title-text"
+ >
+ Examples
+
+
+
-
-
-
-
-
-
-
+
+
diff --git a/src/components/__tests__/Banner.test.tsx b/src/components/__tests__/Banner.test.tsx
index e483eadd85..2c71988b87 100644
--- a/src/components/__tests__/Banner.test.tsx
+++ b/src/components/__tests__/Banner.test.tsx
@@ -338,7 +338,7 @@ describe('animations', () => {
Banner
);
- expect(getByTestId('banner')).toHaveStyle({
+ expect(getByTestId('banner-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -350,7 +350,7 @@ describe('animations', () => {
jest.runAllTimers();
- expect(getByTestId('banner')).toHaveStyle({
+ expect(getByTestId('banner-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/BottomNavigation.test.tsx b/src/components/__tests__/BottomNavigation.test.tsx
index d9e56de211..3a5feb18d4 100644
--- a/src/components/__tests__/BottomNavigation.test.tsx
+++ b/src/components/__tests__/BottomNavigation.test.tsx
@@ -553,7 +553,7 @@ it('barStyle animated value changes correctly', () => {
barStyle={[{ transform: [{ scale: value }] }]}
/>
);
- expect(getByTestId('bottom-navigation-bar')).toHaveStyle({
+ expect(getByTestId('bottom-navigation-bar-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -565,7 +565,7 @@ it('barStyle animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('bottom-navigation-bar')).toHaveStyle({
+ expect(getByTestId('bottom-navigation-bar-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/Button.test.tsx b/src/components/__tests__/Button.test.tsx
index eae12e7d78..0ea394e055 100644
--- a/src/components/__tests__/Button.test.tsx
+++ b/src/components/__tests__/Button.test.tsx
@@ -851,7 +851,7 @@ it('animated value changes correctly', () => {
Compact button
);
- expect(getByTestId('button-container')).toHaveStyle({
+ expect(getByTestId('button-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -863,7 +863,7 @@ it('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('button-container')).toHaveStyle({
+ expect(getByTestId('button-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/Card/Card.test.tsx b/src/components/__tests__/Card/Card.test.tsx
index 260bd18563..6552d03f25 100644
--- a/src/components/__tests__/Card/Card.test.tsx
+++ b/src/components/__tests__/Card/Card.test.tsx
@@ -253,7 +253,7 @@ it('animated value changes correctly', () => {
{null}
);
- expect(getByTestId('card-container')).toHaveStyle({
+ expect(getByTestId('card-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -265,7 +265,7 @@ it('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('card-container')).toHaveStyle({
+ expect(getByTestId('card-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/Card/__snapshots__/Card.test.tsx.snap b/src/components/__tests__/Card/__snapshots__/Card.test.tsx.snap
index e5f6cfc60d..fc20c77354 100644
--- a/src/components/__tests__/Card/__snapshots__/Card.test.tsx.snap
+++ b/src/components/__tests__/Card/__snapshots__/Card.test.tsx.snap
@@ -6,10 +6,14 @@ exports[`Card renders an outlined card 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(255, 251, 254, 1)",
+ "borderRadius": 12,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -21,6 +25,8 @@ exports[`Card renders an outlined card 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="card-container-outer-layer"
@@ -29,6 +35,9 @@ exports[`Card renders an outlined card 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgba(255, 251, 254, 1)",
+ "borderRadius": 12,
+ "elevation": 1,
"flex": undefined,
"shadowColor": "#000",
"shadowOffset": Object {
@@ -39,65 +48,52 @@ exports[`Card renders an outlined card 1`] = `
"shadowRadius": 0,
}
}
- testID="card-container-inner-layer"
+ testID="card-container"
>
+
-
-
-
+ "flexShrink": 1,
+ },
+ undefined,
+ ]
+ }
+ testID="card"
+ />
`;
diff --git a/src/components/__tests__/Chip.test.tsx b/src/components/__tests__/Chip.test.tsx
index 1b5400a36c..73eb76d72d 100644
--- a/src/components/__tests__/Chip.test.tsx
+++ b/src/components/__tests__/Chip.test.tsx
@@ -756,7 +756,7 @@ it('animated value changes correctly', () => {
Example Chip
);
- expect(getByTestId('chip-container')).toHaveStyle({
+ expect(getByTestId('chip-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -768,7 +768,7 @@ it('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('chip-container')).toHaveStyle({
+ expect(getByTestId('chip-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/FAB.test.tsx b/src/components/__tests__/FAB.test.tsx
index 1124ef8b32..32d1e46684 100644
--- a/src/components/__tests__/FAB.test.tsx
+++ b/src/components/__tests__/FAB.test.tsx
@@ -411,7 +411,7 @@ it('animated value changes correctly', () => {
style={[{ transform: [{ scale: value }] }]}
/>
);
- expect(getByTestId('fab-container')).toHaveStyle({
+ expect(getByTestId('fab-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -423,7 +423,7 @@ it('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('fab-container')).toHaveStyle({
+ expect(getByTestId('fab-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/FABGroup.test.tsx b/src/components/__tests__/FABGroup.test.tsx
index a17fef5ca3..b735cf5166 100644
--- a/src/components/__tests__/FABGroup.test.tsx
+++ b/src/components/__tests__/FABGroup.test.tsx
@@ -159,7 +159,6 @@ describe('FABActions - labelStyle - containerStyle', () => {
expect(getByA11yHint('hint')).toHaveStyle({
padding: 16,
backgroundColor: '#687456',
- marginLeft: 16,
});
});
});
@@ -205,7 +204,7 @@ it('animated value changes correctly', () => {
]}
/>
);
- expect(getByTestId('my-fab-container')).toHaveStyle({
+ expect(getByTestId('my-fab-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -217,7 +216,7 @@ it('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('my-fab-container')).toHaveStyle({
+ expect(getByTestId('my-fab-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/IconButton.test.tsx b/src/components/__tests__/IconButton.test.tsx
index 8aa92fa6bf..bf9fa54e97 100644
--- a/src/components/__tests__/IconButton.test.tsx
+++ b/src/components/__tests__/IconButton.test.tsx
@@ -349,7 +349,7 @@ it('action animated value changes correctly', () => {
testID="icon-button"
/>
);
- expect(getByTestId('icon-button-container')).toHaveStyle({
+ expect(getByTestId('icon-button-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -361,7 +361,7 @@ it('action animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('icon-button-container')).toHaveStyle({
+ expect(getByTestId('icon-button-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/Menu.test.tsx b/src/components/__tests__/Menu.test.tsx
index ab8f31a13f..116a2386df 100644
--- a/src/components/__tests__/Menu.test.tsx
+++ b/src/components/__tests__/Menu.test.tsx
@@ -184,7 +184,7 @@ it('animated value changes correctly', () => {
);
- expect(getByTestId('menu-surface')).toHaveStyle({
+ expect(getByTestId('menu-surface-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -196,7 +196,7 @@ it('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('menu-surface')).toHaveStyle({
+ expect(getByTestId('menu-surface-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/Modal.test.tsx b/src/components/__tests__/Modal.test.tsx
index 43d1dab430..8b97733c0d 100644
--- a/src/components/__tests__/Modal.test.tsx
+++ b/src/components/__tests__/Modal.test.tsx
@@ -106,7 +106,7 @@ describe('Modal', () => {
);
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -114,7 +114,7 @@ describe('Modal', () => {
fireEvent.press(getByTestId('modal-backdrop'));
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -126,7 +126,7 @@ describe('Modal', () => {
opacity: 1,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
});
@@ -163,7 +163,7 @@ describe('Modal', () => {
);
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -171,7 +171,7 @@ describe('Modal', () => {
BackHandler.mockPressBack();
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -183,7 +183,7 @@ describe('Modal', () => {
opacity: 1,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
});
@@ -228,7 +228,7 @@ describe('Modal', () => {
);
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -236,7 +236,7 @@ describe('Modal', () => {
fireEvent.press(getByTestId('modal-backdrop'));
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -248,7 +248,7 @@ describe('Modal', () => {
opacity: 1,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
});
@@ -295,7 +295,7 @@ describe('Modal', () => {
);
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -303,7 +303,7 @@ describe('Modal', () => {
BackHandler.mockPressBack();
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -315,7 +315,7 @@ describe('Modal', () => {
opacity: 1,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
});
@@ -371,7 +371,7 @@ describe('Modal', () => {
expect(getByTestId('modal-backdrop')).toHaveStyle({
opacity: 0,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 0,
});
@@ -382,7 +382,7 @@ describe('Modal', () => {
expect(getByTestId('modal-backdrop')).toHaveStyle({
opacity: 1,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
});
@@ -399,7 +399,7 @@ describe('Modal', () => {
expect(getByTestId('modal-backdrop')).toHaveStyle({
opacity: 1,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -412,7 +412,7 @@ describe('Modal', () => {
expect(getByTestId('modal-backdrop')).toHaveStyle({
opacity: 1,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -459,7 +459,7 @@ describe('Modal', () => {
expect(getByTestId('modal-backdrop')).toHaveStyle({
opacity: 1,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -472,7 +472,7 @@ describe('Modal', () => {
expect(getByTestId('modal-backdrop')).toHaveStyle({
opacity: 1,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -497,7 +497,7 @@ describe('Modal', () => {
expect(getByTestId('modal-backdrop')).toHaveStyle({
opacity: 1,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -510,7 +510,7 @@ describe('Modal', () => {
expect(getByTestId('modal-backdrop')).toHaveStyle({
opacity: 1,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
@@ -533,7 +533,7 @@ describe('Modal', () => {
expect(getByTestId('modal-backdrop')).toHaveStyle({
opacity: 1,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 1,
});
});
@@ -558,7 +558,7 @@ describe('Modal', () => {
expect(getByTestId('modal-backdrop')).toHaveStyle({
opacity: 0,
});
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
opacity: 0,
});
@@ -596,7 +596,7 @@ describe('Modal', () => {
{null}
);
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -608,7 +608,7 @@ describe('Modal', () => {
jest.runAllTimers();
- expect(getByTestId('modal-surface')).toHaveStyle({
+ expect(getByTestId('modal-surface-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/Searchbar.test.tsx b/src/components/__tests__/Searchbar.test.tsx
index 3b3a23149f..fffd1032c5 100644
--- a/src/components/__tests__/Searchbar.test.tsx
+++ b/src/components/__tests__/Searchbar.test.tsx
@@ -78,7 +78,7 @@ it('animated value changes correctly', () => {
style={[{ transform: [{ scale: value }] }]}
/>
);
- expect(getByTestId('search-bar-container')).toHaveStyle({
+ expect(getByTestId('search-bar-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -90,7 +90,7 @@ it('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('search-bar-container')).toHaveStyle({
+ expect(getByTestId('search-bar-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/Snackbar.test.tsx b/src/components/__tests__/Snackbar.test.tsx
index 074609af04..41aec30f77 100644
--- a/src/components/__tests__/Snackbar.test.tsx
+++ b/src/components/__tests__/Snackbar.test.tsx
@@ -128,7 +128,7 @@ it('animated value changes correctly', () => {
Snackbar content
);
- expect(getByTestId('snack-bar')).toHaveStyle({
+ expect(getByTestId('snack-bar-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -140,7 +140,7 @@ it('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('snack-bar')).toHaveStyle({
+ expect(getByTestId('snack-bar-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/Surface.test.tsx b/src/components/__tests__/Surface.test.tsx
index 9d68ed43d6..d56fea2c82 100644
--- a/src/components/__tests__/Surface.test.tsx
+++ b/src/components/__tests__/Surface.test.tsx
@@ -28,10 +28,9 @@ describe('Surface', () => {
right: 40,
start: 50,
top: 60,
- flex: 1,
},
innerLayerViewStyle: {
- flex: 1,
+ padding: 13,
},
restStyle: {
padding: 10,
@@ -40,6 +39,86 @@ describe('Surface', () => {
},
});
+ it.each`
+ property | value
+ ${'opacity'} | ${0.7}
+ ${'transform'} | ${[{ scale: 1.02 }]}
+ ${'width'} | ${'42%'}
+ ${'height'} | ${'32.5%'}
+ ${'margin'} | ${13}
+ ${'marginLeft'} | ${13.1}
+ ${'marginRight'} | ${13.2}
+ ${'marginTop'} | ${13.3}
+ ${'marginBottom'} | ${13.4}
+ ${'marginHorizontal'} | ${13.5}
+ ${'marginVertical'} | ${13.6}
+ ${'position'} | ${'absolute'}
+ ${'alignSelf'} | ${'flex-start'}
+ ${'top'} | ${1.1}
+ ${'right'} | ${1.2}
+ ${'bottom'} | ${1.3}
+ ${'left'} | ${1.4}
+ ${'start'} | ${1.5}
+ ${'end'} | ${1.6}
+ ${'flex'} | ${6}
+ `('applies $property to outer layer only', ({ property, value }) => {
+ const style = { [property]: value };
+
+ const { getByTestId } = render(
+
+ {null}
+
+ );
+
+ expect(getByTestId('surface-test-outer-layer')).toHaveStyle(style);
+ expect(getByTestId('surface-test')).not.toHaveStyle(style);
+ });
+
+ it.each`
+ property | value
+ ${'padding'} | ${12}
+ ${'paddingLeft'} | ${12.1}
+ ${'paddingRight'} | ${12.2}
+ ${'paddingTop'} | ${12.3}
+ ${'paddingBottom'} | ${12.4}
+ ${'paddingHorizontal'} | ${12.5}
+ ${'paddingVertical'} | ${12.6}
+ ${'borderWidth'} | ${2}
+ ${'borderColor'} | ${'black'}
+ `('applies $property to inner layer only', ({ property, value }) => {
+ const style = { [property]: value };
+
+ const { getByTestId } = render(
+
+ {null}
+
+ );
+
+ expect(getByTestId('surface-test-outer-layer')).not.toHaveStyle(style);
+ expect(getByTestId('surface-test')).toHaveStyle(style);
+ });
+
+ it.each`
+ property | value
+ ${'borderRadius'} | ${3}
+ ${'borderTopLeftRadius'} | ${1}
+ ${'borderTopRightRadius'} | ${2}
+ ${'borderBottomLeftRadius'} | ${3}
+ ${'borderBottomRightRadius'} | ${4}
+ ${'backgroundColor'} | ${'rgb(4, 5, 6)'}
+ `('applies $property to every layer', ({ property, value }) => {
+ const style = { [property]: value };
+
+ const { getByTestId } = render(
+
+ {null}
+
+ );
+
+ expect(getByTestId('surface-test-outer-layer')).toHaveStyle(style);
+ expect(getByTestId('surface-test')).toHaveStyle(style);
+ });
+
describe('outer layer', () => {
it('should not render rest style', () => {
const testID = 'surface-test';
@@ -69,36 +148,22 @@ describe('Surface', () => {
);
});
- it('should render inner layer styles on outer layer', () => {
+ it('should render absolute position properties on the outer layer', () => {
const testID = 'surface-test';
const { getByTestId } = render(
-
+
{null}
);
expect(getByTestId(`${testID}-outer-layer`)).toHaveStyle(
- styles.innerLayerViewStyle
+ styles.absoluteStyles
);
});
});
describe('inner layer', () => {
- it('should not render absolute position properties on the inner layer', () => {
- const testID = 'surface-test';
-
- const { getByTestId } = render(
-
- {null}
-
- );
-
- expect(getByTestId(`${testID}-inner-layer`)).not.toHaveStyle(
- styles.absoluteStyles
- );
- });
-
it('should render inner layer styles on the inner layer', () => {
const testID = 'surface-test';
@@ -108,12 +173,26 @@ describe('Surface', () => {
);
- expect(getByTestId(`${testID}-inner-layer`)).toHaveStyle(
- styles.innerLayerViewStyle
- );
+ expect(getByTestId(testID)).toHaveStyle(styles.innerLayerViewStyle);
});
});
+ it('applies backgroundColor to every layer', () => {
+ const backgroundColor = 'rgb(1, 2, 3)';
+ const { getByTestId } = render(
+
+ {null}
+
+ );
+
+ const style = { backgroundColor };
+ expect(getByTestId('surface-test-outer-layer')).toHaveStyle(style);
+ expect(getByTestId('surface-test')).toHaveStyle(style);
+ });
+
describe('children wrapper', () => {
it('should render rest styles', () => {
const testID = 'surface-test';
diff --git a/src/components/__tests__/ToggleButton.test.tsx b/src/components/__tests__/ToggleButton.test.tsx
index a8f8e5b924..e55ab7f239 100644
--- a/src/components/__tests__/ToggleButton.test.tsx
+++ b/src/components/__tests__/ToggleButton.test.tsx
@@ -85,7 +85,7 @@ it('animated value changes correctly', () => {
style={[{ transform: [{ scale: value }] }]}
/>
);
- expect(getByTestId('toggle-button-container')).toHaveStyle({
+ expect(getByTestId('toggle-button-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1 }],
});
@@ -97,7 +97,7 @@ it('animated value changes correctly', () => {
jest.advanceTimersByTime(200);
- expect(getByTestId('toggle-button-container')).toHaveStyle({
+ expect(getByTestId('toggle-button-container-outer-layer')).toHaveStyle({
transform: [{ scale: 1.5 }],
});
});
diff --git a/src/components/__tests__/__snapshots__/AnimatedFAB.test.tsx.snap b/src/components/__tests__/__snapshots__/AnimatedFAB.test.tsx.snap
index c343637d3e..ddefdd96be 100644
--- a/src/components/__tests__/__snapshots__/AnimatedFAB.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/AnimatedFAB.test.tsx.snap
@@ -6,10 +6,14 @@ exports[`renders animated fab 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 16,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": "absolute",
"right": undefined,
"shadowColor": "#000",
@@ -21,6 +25,12 @@ exports[`renders animated fab 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="animated-fab-container-outer-layer"
@@ -29,6 +39,8 @@ exports[`renders animated fab 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderRadius": 16,
"flex": undefined,
"shadowColor": "#000",
"shadowOffset": Object {
@@ -39,259 +51,241 @@ exports[`renders animated fab 1`] = `
"shadowRadius": 3,
}
}
- testID="animated-fab-container-inner-layer"
+ testID="animated-fab-container"
>
-
-
+
-
+ }
+ />
+
+
-
-
+ />
-
+
+
-
+
+
+
-
-
-
-
-
-
+ }
+ testID="animated-fab-text"
+ />
@@ -303,10 +297,14 @@ exports[`renders animated fab with label on the left 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 16,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": "absolute",
"right": undefined,
"shadowColor": "#000",
@@ -318,6 +316,12 @@ exports[`renders animated fab with label on the left 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="animated-fab-container-outer-layer"
@@ -326,6 +330,8 @@ exports[`renders animated fab with label on the left 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderRadius": 16,
"flex": undefined,
"shadowColor": "#000",
"shadowOffset": Object {
@@ -336,261 +342,243 @@ exports[`renders animated fab with label on the left 1`] = `
"shadowRadius": 3,
}
}
- testID="animated-fab-container-inner-layer"
+ testID="animated-fab-container"
>
-
-
+
-
+ }
+ />
+
+
-
-
+ />
-
+
+
-
+
+
+
-
-
-
-
-
- text
-
-
+ text
+
@@ -602,10 +590,14 @@ exports[`renders animated fab with label on the right by default 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 16,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": "absolute",
"right": undefined,
"shadowColor": "#000",
@@ -617,6 +609,12 @@ exports[`renders animated fab with label on the right by default 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="animated-fab-container-outer-layer"
@@ -625,6 +623,8 @@ exports[`renders animated fab with label on the right by default 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderRadius": 16,
"flex": undefined,
"shadowColor": "#000",
"shadowOffset": Object {
@@ -635,261 +635,243 @@ exports[`renders animated fab with label on the right by default 1`] = `
"shadowRadius": 3,
}
}
- testID="animated-fab-container-inner-layer"
+ testID="animated-fab-container"
>
-
-
+
-
+ }
+ />
+
+
-
-
+ />
-
+
+
-
+
+
+
-
-
-
-
-
- text
-
-
+ text
+
diff --git a/src/components/__tests__/__snapshots__/Banner.test.tsx.snap b/src/components/__tests__/__snapshots__/Banner.test.tsx.snap
index 4f9889ae3b..f2aa6d1640 100644
--- a/src/components/__tests__/__snapshots__/Banner.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/Banner.test.tsx.snap
@@ -6,10 +6,13 @@ exports[`render visible banner, with custom theme 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgb(247, 243, 249)",
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -21,6 +24,8 @@ exports[`render visible banner, with custom theme 1`] = `
"shadowRadius": 3,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="surface-outer-layer"
@@ -29,6 +34,7 @@ exports[`render visible banner, with custom theme 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgb(247, 243, 249)",
"flex": undefined,
"shadowColor": "#000",
"shadowOffset": Object {
@@ -39,108 +45,128 @@ exports[`render visible banner, with custom theme 1`] = `
"shadowRadius": 1,
}
}
- testID="surface-inner-layer"
+ testID="surface"
>
+
-
-
-
- Custom theme
-
-
+ ],
+ ]
+ }
+ >
+ Custom theme
+
+
+
-
-
-
- first
-
-
-
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ first
+
@@ -298,10 +288,13 @@ exports[`renders hidden banner, without action buttons and without image 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgb(247, 243, 249)",
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 0,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -313,6 +306,8 @@ exports[`renders hidden banner, without action buttons and without image 1`] = `
"shadowRadius": 3,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="surface-outer-layer"
@@ -321,6 +316,7 @@ exports[`renders hidden banner, without action buttons and without image 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgb(247, 243, 249)",
"flex": undefined,
"shadowColor": "#000",
"shadowOffset": Object {
@@ -331,110 +327,98 @@ exports[`renders hidden banner, without action buttons and without image 1`] = `
"shadowRadius": 1,
}
}
- testID="surface-inner-layer"
+ testID="surface"
>
-
+
+ }
+ >
-
-
- Two line text string with two actions. One to two lines is preferable on mobile.
-
-
-
+ >
+ Two line text string with two actions. One to two lines is preferable on mobile.
+
+
@@ -447,10 +431,13 @@ exports[`renders visible banner, with action buttons and with image 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgb(247, 243, 249)",
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -462,6 +449,8 @@ exports[`renders visible banner, with action buttons and with image 1`] = `
"shadowRadius": 3,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="surface-outer-layer"
@@ -470,6 +459,7 @@ exports[`renders visible banner, with action buttons and with image 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgb(247, 243, 249)",
"flex": undefined,
"shadowColor": "#000",
"shadowOffset": Object {
@@ -480,130 +470,150 @@ exports[`renders visible banner, with action buttons and with image 1`] = `
"shadowRadius": 1,
}
}
- testID="surface-inner-layer"
+ testID="surface"
>
+
-
-
-
-
-
+
+
- Two line text string with two actions. One to two lines is preferable on mobile.
-
-
+ ],
+ ]
+ }
+ >
+ Two line text string with two actions. One to two lines is preferable on mobile.
+
+
+
-
-
-
- first
-
-
-
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ first
+
@@ -761,10 +735,13 @@ exports[`renders visible banner, with action buttons and without image 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgb(247, 243, 249)",
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -776,6 +753,8 @@ exports[`renders visible banner, with action buttons and without image 1`] = `
"shadowRadius": 3,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="surface-outer-layer"
@@ -784,6 +763,7 @@ exports[`renders visible banner, with action buttons and without image 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgb(247, 243, 249)",
"flex": undefined,
"shadowColor": "#000",
"shadowOffset": Object {
@@ -794,108 +774,128 @@ exports[`renders visible banner, with action buttons and without image 1`] = `
"shadowRadius": 1,
}
}
- testID="surface-inner-layer"
+ testID="surface"
>
+
-
-
-
- Two line text string with two actions. One to two lines is preferable on mobile.
-
-
+ ],
+ ]
+ }
+ >
+ Two line text string with two actions. One to two lines is preferable on mobile.
+
+
+
-
-
-
- first
-
-
-
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ first
+
+
+
-
-
-
- second
-
-
-
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ second
+
@@ -1207,10 +1167,13 @@ exports[`renders visible banner, without action buttons and with image 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgb(247, 243, 249)",
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1222,6 +1185,8 @@ exports[`renders visible banner, without action buttons and with image 1`] = `
"shadowRadius": 3,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="surface-outer-layer"
@@ -1230,6 +1195,7 @@ exports[`renders visible banner, without action buttons and with image 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgb(247, 243, 249)",
"flex": undefined,
"shadowColor": "#000",
"shadowOffset": Object {
@@ -1240,120 +1206,108 @@ exports[`renders visible banner, without action buttons and with image 1`] = `
"shadowRadius": 1,
}
}
- testID="surface-inner-layer"
+ testID="surface"
>
+
-
-
-
-
-
+
+
- Two line text string with two actions. One to two lines is preferable on mobile.
-
-
-
+ >
+ Two line text string with two actions. One to two lines is preferable on mobile.
+
+
@@ -1366,10 +1320,13 @@ exports[`renders visible banner, without action buttons and without image 1`] =
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgb(247, 243, 249)",
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1381,6 +1338,8 @@ exports[`renders visible banner, without action buttons and without image 1`] =
"shadowRadius": 3,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="surface-outer-layer"
@@ -1389,6 +1348,7 @@ exports[`renders visible banner, without action buttons and without image 1`] =
collapsable={false}
style={
Object {
+ "backgroundColor": "rgb(247, 243, 249)",
"flex": undefined,
"shadowColor": "#000",
"shadowOffset": Object {
@@ -1399,98 +1359,86 @@ exports[`renders visible banner, without action buttons and without image 1`] =
"shadowRadius": 1,
}
}
- testID="surface-inner-layer"
+ testID="surface"
>
+
-
-
-
- Two line text string with two actions. One to two lines is preferable on mobile.
-
-
-
+ >
+ Two line text string with two actions. One to two lines is preferable on mobile.
+
+
diff --git a/src/components/__tests__/__snapshots__/BottomNavigation.test.tsx.snap b/src/components/__tests__/__snapshots__/BottomNavigation.test.tsx.snap
index f8ae5027d0..a5888a71aa 100644
--- a/src/components/__tests__/__snapshots__/BottomNavigation.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/BottomNavigation.test.tsx.snap
@@ -75,10 +75,13 @@ exports[`hides labels in non-shifting bottom navigation 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
"bottom": 0,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": 0,
+ "opacity": undefined,
"position": undefined,
"right": 0,
"shadowColor": "#000",
@@ -90,14 +93,19 @@ exports[`hides labels in non-shifting bottom navigation 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="bottom-navigation-bar-outer-layer"
>
@@ -192,208 +202,208 @@ exports[`hides labels in non-shifting bottom navigation 1`] = `
style={
Object {
"alignSelf": "center",
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderRadius": 16,
"height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "transform": Array [
+ Object {
+ "scaleX": 1,
+ },
+ ],
+ "width": 64,
+ }
+ }
+ />
+
-
-
-
-
-
-
-
+
+
-
-
-
-
-
+
-
+
+
+
-
+ }
+ />
+
+
@@ -401,192 +411,192 @@ exports[`hides labels in non-shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
-
+ }
+ />
+
+
@@ -594,169 +604,154 @@ exports[`hides labels in non-shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-`;
-
-exports[`hides labels in shifting bottom navigation 1`] = `
-
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`hides labels in shifting bottom navigation 1`] = `
+
@@ -945,208 +950,208 @@ exports[`hides labels in shifting bottom navigation 1`] = `
style={
Object {
"alignSelf": "center",
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderRadius": 16,
"height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "transform": Array [
+ Object {
+ "scaleX": 1,
+ },
+ ],
+ "width": 64,
+ }
+ }
+ />
+
-
-
-
-
-
-
-
+
+
-
-
-
-
-
+
-
+
+
+
-
+ }
+ />
+
+
@@ -1154,192 +1159,192 @@ exports[`hides labels in shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
-
+ }
+ />
+
+
@@ -1347,154 +1352,139 @@ exports[`hides labels in shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
+
+
-
+ }
+ />
@@ -1713,10 +1703,13 @@ exports[`renders bottom navigation with getLazy 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
"bottom": 0,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": 0,
+ "opacity": undefined,
"position": undefined,
"right": 0,
"shadowColor": "#000",
@@ -1728,14 +1721,19 @@ exports[`renders bottom navigation with getLazy 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="bottom-navigation-bar-outer-layer"
>
@@ -1829,323 +1829,323 @@ exports[`renders bottom navigation with getLazy 1`] = `
style={
Object {
"alignSelf": "center",
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderRadius": 16,
"height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "transform": Array [
+ Object {
+ "scaleX": 1,
+ },
+ ],
+ "width": 64,
+ }
+ }
+ />
+
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+ Route: 0
+
-
-
- Route: 0
-
-
-
-
- Route: 0
-
-
+ ],
+ ]
+ }
+ >
+ Route: 0
+
+
+
@@ -2153,307 +2153,147 @@ exports[`renders bottom navigation with getLazy 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
- Route: 1
-
-
-
+
+
+
+
+
-
- Route: 1
-
-
+ />
-
-
@@ -2461,307 +2301,159 @@ exports[`renders bottom navigation with getLazy 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "bottom": 0,
+ "left": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 0,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Route: 1
+
-
-
- Route: 2
-
-
-
-
- Route: 2
-
-
+ ],
+ ]
+ }
+ >
+ Route: 1
+
+
+
@@ -2769,307 +2461,147 @@ exports[`renders bottom navigation with getLazy 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
- Route: 3
-
-
-
+
+
+
+
+
-
- Route: 3
-
-
+ />
-
-
@@ -3077,464 +2609,159 @@ exports[`renders bottom navigation with getLazy 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "bottom": 0,
+ "left": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 0,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Route: 2
+
-
-
- Route: 4
-
-
-
-
- Route: 4
-
-
+ ],
+ ]
+ }
+ >
+ Route: 2
+
-
-
-
-
-
-`;
-
-exports[`renders bottom navigation with scene animation 1`] = `
-
-
-
-
- Route: 0
-
-
-
-
-
-
-
-
@@ -3542,276 +2769,147 @@ exports[`renders bottom navigation with scene animation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 0,
- },
- ],
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
+
+
-
-
-
-
-
+
-
-
+
+
-
-
- Route: 0
-
-
+ />
-
-
@@ -3819,259 +2917,159 @@ exports[`renders bottom navigation with scene animation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 7,
- },
- ],
- "width": 32,
+ "bottom": 0,
+ "left": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 0,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Route: 3
+
-
-
- Route: 1
-
-
+ ],
+ ]
+ }
+ >
+ Route: 3
+
+
+
@@ -4079,259 +3077,147 @@ exports[`renders bottom navigation with scene animation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 7,
- },
- ],
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
- Route: 2
-
-
+ />
-
-
@@ -4339,482 +3225,107 @@ exports[`renders bottom navigation with scene animation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 7,
- },
- ],
- "width": 32,
+ "bottom": 0,
+ "left": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 0,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Route: 3
-
-
+ ],
+ ]
+ }
+ >
+ Route: 4
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Route: 4
-
-
+ ],
+ ]
+ }
+ >
+ Route: 4
+
@@ -4826,7 +3337,7 @@ exports[`renders bottom navigation with scene animation 1`] = `
`;
-exports[`renders custom icon and label in non-shifting bottom navigation 1`] = `
+exports[`renders bottom navigation with scene animation 1`] = `
@@ -5017,188 +3543,275 @@ exports[`renders custom icon and label in non-shifting bottom navigation 1`] = `
style={
Object {
"alignSelf": "center",
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderRadius": 16,
"height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "transform": Array [
+ Object {
+ "scaleX": 1,
+ },
+ ],
+ "width": 64,
+ }
+ }
+ />
+
-
-
-
-
-
+
+
-
-
-
+
-
-
+
+
-
-
- Route: 0
-
-
-
+
+
+
+
+
-
- Route: 0
-
-
+ Route: 0
+
+
+
@@ -5206,172 +3819,259 @@ exports[`renders custom icon and label in non-shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
-
- Route: 1
-
-
-
+
+
+
+
+
+
-
- Route: 1
-
-
+ Route: 1
+
+
+
@@ -5379,329 +4079,259 @@ exports[`renders custom icon and label in non-shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
-
- Route: 2
-
-
-
+
-
- Route: 2
-
-
+ />
-
-
-
-
-
-
-
-`;
-
-exports[`renders custom icon and label in shifting bottom navigation 1`] = `
-
-
-
-
+
+
+ Route: 2
+
+
+
+
+
+
- Route: 0
-
-
-
-
-
-
-
-
@@ -5709,176 +4339,147 @@ exports[`renders custom icon and label in shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 0,
- },
- ],
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
+
+
-
-
-
+
-
-
+
+
-
-
- Route: 0
-
-
+ />
-
-
@@ -5886,159 +4487,111 @@ exports[`renders custom icon and label in shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 7,
- },
- ],
- "width": 32,
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 0,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
-
-
- Route: 1
-
-
+ Route: 3
+
+
+
@@ -6046,319 +4599,147 @@ exports[`renders custom icon and label in shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 7,
- },
- ],
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
-
-
- Route: 2
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
- Route: 3
-
-
+ />
-
-
@@ -6366,122 +4747,54 @@ exports[`renders custom icon and label in shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 7,
- },
- ],
- "width": 32,
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 0,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
-
-
- Route: 4
-
-
+ Route: 4
+
@@ -6493,7 +4806,7 @@ exports[`renders custom icon and label in shifting bottom navigation 1`] = `
`;
-exports[`renders custom icon and label with custom colors in non-shifting bottom navigation 1`] = `
+exports[`renders custom icon and label in non-shifting bottom navigation 1`] = `
+ Array [
+ Object {
+ "flexDirection": "row",
+ },
+ Object {
+ "marginBottom": 0,
+ "marginHorizontal": 0,
+ },
+ false,
+ ]
+ }
+ testID="bottom-navigation-bar-content-wrapper"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Route: 0
+
+
+
+
+ Route: 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Route: 1
+
+
+
+
+ Route: 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Route: 2
+
+
+
+
+ Route: 2
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`renders custom icon and label in shifting bottom navigation 1`] = `
+
+
+
+
+ Route: 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Route: 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Route: 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Route: 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Route: 3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Route: 4
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`renders custom icon and label with custom colors in non-shifting bottom navigation 1`] = `
+
+
+
+
+ Route: 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Route: 0
+
+
+
+
+ Route: 0
+
+
+
+
+
@@ -6683,324 +6988,307 @@ exports[`renders custom icon and label with custom colors in non-shifting bottom
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+ Route: 1
+
-
-
- Route: 0
-
-
-
-
- Route: 0
-
-
+ ],
+ ]
+ }
+ >
+ Route: 1
+
+
+
@@ -7008,307 +7296,147 @@ exports[`renders custom icon and label with custom colors in non-shifting bottom
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
- Route: 1
-
-
-
+
+
+
+
+
-
- Route: 1
-
-
+ />
-
-
@@ -7316,270 +7444,107 @@ exports[`renders custom icon and label with custom colors in non-shifting bottom
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "bottom": 0,
+ "left": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 0,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Route: 2
+
-
-
- Route: 2
-
-
-
-
- Route: 2
-
-
+ ],
+ ]
+ }
+ >
+ Route: 2
+
@@ -7666,10 +7631,13 @@ exports[`renders custom icon and label with custom colors in shifting bottom nav
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
"bottom": 0,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": 0,
+ "opacity": undefined,
"position": undefined,
"right": 0,
"shadowColor": "#000",
@@ -7681,14 +7649,19 @@ exports[`renders custom icon and label with custom colors in shifting bottom nav
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="bottom-navigation-bar-outer-layer"
>
@@ -7782,275 +7762,275 @@ exports[`renders custom icon and label with custom colors in shifting bottom nav
style={
Object {
"alignSelf": "center",
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderRadius": 16,
"height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
"transform": Array [
Object {
- "translateY": 0,
+ "scaleX": 1,
},
],
- "width": 32,
+ "width": 64,
+ }
+ }
+ />
+
-
-
-
-
-
-
-
+
+
-
-
-
-
-
+
-
-
+
+
-
-
+
+
+
+
+
- Route: 0
-
-
+ ],
+ ]
+ }
+ >
+ Route: 0
+
+
+
@@ -8058,259 +8038,259 @@ exports[`renders custom icon and label with custom colors in shifting bottom nav
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 7,
- },
- ],
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
+
+
+
+
+
- Route: 1
-
-
+ ],
+ ]
+ }
+ >
+ Route: 1
+
+
+
@@ -8318,222 +8298,202 @@ exports[`renders custom icon and label with custom colors in shifting bottom nav
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 7,
- },
- ],
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
+
+
+
+
+
- Route: 2
-
-
+ ],
+ ]
+ }
+ >
+ Route: 2
+
@@ -8620,10 +8580,13 @@ exports[`renders non-shifting bottom navigation 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
"bottom": 0,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": 0,
+ "opacity": undefined,
"position": undefined,
"right": 0,
"shadowColor": "#000",
@@ -8635,14 +8598,19 @@ exports[`renders non-shifting bottom navigation 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="bottom-navigation-bar-outer-layer"
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Route: 0
+
+
+
+
+ Route: 0
+
+
+
+
+
+
@@ -8735,324 +9030,307 @@ exports[`renders non-shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+ Route: 1
+
-
-
- Route: 0
-
-
-
-
- Route: 0
-
-
+ ],
+ ]
+ }
+ >
+ Route: 1
+
+
+
@@ -9060,307 +9338,147 @@ exports[`renders non-shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
- Route: 1
-
-
-
+
-
- Route: 1
-
-
+ />
-
-
@@ -9368,270 +9486,107 @@ exports[`renders non-shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "width": 32,
+ "bottom": 0,
+ "left": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 0,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Route: 2
+
-
-
- Route: 2
-
-
-
-
- Route: 2
-
-
+ ],
+ ]
+ }
+ >
+ Route: 2
+
@@ -9718,10 +9673,13 @@ exports[`renders shifting bottom navigation 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
"bottom": 0,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": 0,
+ "opacity": undefined,
"position": undefined,
"right": 0,
"shadowColor": "#000",
@@ -9733,14 +9691,19 @@ exports[`renders shifting bottom navigation 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="bottom-navigation-bar-outer-layer"
>
@@ -9834,275 +9804,275 @@ exports[`renders shifting bottom navigation 1`] = `
style={
Object {
"alignSelf": "center",
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderRadius": 16,
"height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
"transform": Array [
Object {
- "translateY": 0,
+ "scaleX": 1,
},
],
- "width": 32,
+ "width": 64,
+ }
+ }
+ />
+
-
-
-
-
-
-
-
+
+
-
-
-
-
-
+
-
-
+
+
-
-
+
+
+
+
+
- Route: 0
-
-
+ ],
+ ]
+ }
+ >
+ Route: 0
+
+
+
@@ -10110,259 +10080,259 @@ exports[`renders shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 7,
- },
- ],
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
+
+
+
+
+
- Route: 1
-
-
+ ],
+ ]
+ }
+ >
+ Route: 1
+
+
+
@@ -10370,259 +10340,259 @@ exports[`renders shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 7,
- },
- ],
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
+
+
+
+
+
- Route: 2
-
-
+ ],
+ ]
+ }
+ >
+ Route: 2
+
+
+
@@ -10630,259 +10600,259 @@ exports[`renders shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 7,
- },
- ],
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
+
+
+
+
+
- Route: 3
-
-
+ ],
+ ]
+ }
+ >
+ Route: 3
+
+
+
@@ -10890,222 +10860,202 @@ exports[`renders shifting bottom navigation 1`] = `
collapsable={false}
style={
Object {
- "alignSelf": "center",
- "height": 32,
- "justifyContent": "center",
- "marginBottom": 4,
- "marginHorizontal": 12,
- "marginTop": 0,
- "transform": Array [
- Object {
- "translateY": 7,
- },
- ],
- "width": 32,
+ "alignItems": "center",
+ "bottom": 0,
+ "left": 0,
+ "opacity": 0,
+ "position": "absolute",
+ "right": 0,
+ "top": 4,
}
}
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
+
+
+
+
+
- Route: 4
-
-
+ ],
+ ]
+ }
+ >
+ Route: 4
+
diff --git a/src/components/__tests__/__snapshots__/Button.test.tsx.snap b/src/components/__tests__/__snapshots__/Button.test.tsx.snap
index f1c03b5fc9..8b7bb4d2b8 100644
--- a/src/components/__tests__/__snapshots__/Button.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/Button.test.tsx.snap
@@ -6,10 +6,14 @@ exports[`renders button with an accessibility hint 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -21,6 +25,8 @@ exports[`renders button with an accessibility hint 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -29,7 +35,13 @@ exports[`renders button with an accessibility hint 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "transparent",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -39,116 +51,100 @@ exports[`renders button with an accessibility hint 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
- Button with accessibility hint
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Button with accessibility hint
+
@@ -161,10 +157,14 @@ exports[`renders button with an accessibility label 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -176,6 +176,8 @@ exports[`renders button with an accessibility label 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -184,7 +186,13 @@ exports[`renders button with an accessibility label 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "transparent",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -194,116 +202,100 @@ exports[`renders button with an accessibility label 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
- Button with accessibility label
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Button with accessibility label
+
@@ -316,10 +308,14 @@ exports[`renders button with button color 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "#e91e63",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -331,6 +327,8 @@ exports[`renders button with button color 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -339,7 +337,13 @@ exports[`renders button with button color 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "#e91e63",
+ "borderColor": "transparent",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -349,115 +353,99 @@ exports[`renders button with button color 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
- Custom Button
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Custom Button
+
@@ -470,10 +458,14 @@ exports[`renders button with color 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -485,6 +477,8 @@ exports[`renders button with color 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -493,7 +487,13 @@ exports[`renders button with color 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "transparent",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -503,115 +503,99 @@ exports[`renders button with color 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
- Custom Button
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Custom Button
+
@@ -624,10 +608,14 @@ exports[`renders button with custom testID 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -639,6 +627,8 @@ exports[`renders button with custom testID 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="custom:testID-container-outer-layer"
@@ -647,7 +637,13 @@ exports[`renders button with custom testID 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "transparent",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -657,115 +653,99 @@ exports[`renders button with custom testID 1`] = `
"shadowRadius": 0,
}
}
- testID="custom:testID-container-inner-layer"
+ testID="custom:testID-container"
>
-
-
- Button with custom testID
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="custom:testID-text"
+ >
+ Button with custom testID
+
@@ -778,10 +758,14 @@ exports[`renders button with icon 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -793,6 +777,8 @@ exports[`renders button with icon 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -801,7 +787,13 @@ exports[`renders button with icon 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "transparent",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -811,171 +803,155 @@ exports[`renders button with icon 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
-
-
-
- Icon Button
+
+
+ Icon Button
+
@@ -988,10 +964,14 @@ exports[`renders button with icon in reverse order 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1003,6 +983,8 @@ exports[`renders button with icon in reverse order 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -1011,7 +993,13 @@ exports[`renders button with icon in reverse order 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "transparent",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1021,173 +1009,157 @@ exports[`renders button with icon in reverse order 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
-
-
-
- Right Icon
+
+
+ Right Icon
+
@@ -1200,10 +1172,14 @@ exports[`renders contained contained with mode 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(103, 80, 164, 1)",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1215,6 +1191,8 @@ exports[`renders contained contained with mode 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -1223,7 +1201,13 @@ exports[`renders contained contained with mode 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgba(103, 80, 164, 1)",
+ "borderColor": "transparent",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1233,116 +1217,100 @@ exports[`renders contained contained with mode 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
- Contained Button
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Contained Button
+
@@ -1355,10 +1323,14 @@ exports[`renders disabled button 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1370,6 +1342,8 @@ exports[`renders disabled button 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -1378,7 +1352,13 @@ exports[`renders disabled button 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "transparent",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1388,115 +1368,99 @@ exports[`renders disabled button 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
- Disabled Button
-
-
+ "color": "rgba(28, 27, 31, 0.38)",
+ "fontFamily": "System",
+ "fontSize": 14,
+ "fontWeight": "500",
+ "letterSpacing": 0.1,
+ "lineHeight": 20,
+ },
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Disabled Button
+
@@ -1509,10 +1473,14 @@ exports[`renders loading button 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1524,6 +1492,8 @@ exports[`renders loading button 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -1532,7 +1502,13 @@ exports[`renders loading button 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "transparent",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1542,105 +1518,104 @@ exports[`renders loading button 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
@@ -1648,13 +1623,13 @@ exports[`renders loading button 1`] = `
collapsable={false}
style={
Object {
- "alignItems": "center",
- "bottom": 0,
- "justifyContent": "center",
- "left": 0,
- "position": "absolute",
- "right": 0,
- "top": 0,
+ "height": 18,
+ "transform": Array [
+ Object {
+ "rotate": "45deg",
+ },
+ ],
+ "width": 18,
}
}
>
@@ -1662,12 +1637,8 @@ exports[`renders loading button 1`] = `
collapsable={false}
style={
Object {
- "height": 18,
- "transform": Array [
- Object {
- "rotate": "45deg",
- },
- ],
+ "height": 9,
+ "overflow": "hidden",
"width": 18,
}
}
@@ -1676,8 +1647,15 @@ exports[`renders loading button 1`] = `
collapsable={false}
style={
Object {
- "height": 9,
- "overflow": "hidden",
+ "height": 18,
+ "transform": Array [
+ Object {
+ "translateY": 0,
+ },
+ Object {
+ "rotate": "-165deg",
+ },
+ ],
"width": 18,
}
}
@@ -1686,15 +1664,8 @@ exports[`renders loading button 1`] = `
collapsable={false}
style={
Object {
- "height": 18,
- "transform": Array [
- Object {
- "translateY": 0,
- },
- Object {
- "rotate": "-165deg",
- },
- ],
+ "height": 9,
+ "overflow": "hidden",
"width": 18,
}
}
@@ -1703,40 +1674,44 @@ exports[`renders loading button 1`] = `
collapsable={false}
style={
Object {
- "height": 9,
- "overflow": "hidden",
+ "borderColor": "rgba(103, 80, 164, 1)",
+ "borderRadius": 9,
+ "borderWidth": 1.8,
+ "height": 18,
"width": 18,
}
}
- >
-
-
+ />
+
+
@@ -1744,12 +1719,9 @@ exports[`renders loading button 1`] = `
collapsable={false}
style={
Object {
- "height": 18,
- "transform": Array [
- Object {
- "rotate": "45deg",
- },
- ],
+ "height": 9,
+ "overflow": "hidden",
+ "top": 9,
"width": 18,
}
}
@@ -1758,9 +1730,15 @@ exports[`renders loading button 1`] = `
collapsable={false}
style={
Object {
- "height": 9,
- "overflow": "hidden",
- "top": 9,
+ "height": 18,
+ "transform": Array [
+ Object {
+ "translateY": -9,
+ },
+ Object {
+ "rotate": "345deg",
+ },
+ ],
"width": 18,
}
}
@@ -1769,15 +1747,8 @@ exports[`renders loading button 1`] = `
collapsable={false}
style={
Object {
- "height": 18,
- "transform": Array [
- Object {
- "translateY": -9,
- },
- Object {
- "rotate": "345deg",
- },
- ],
+ "height": 9,
+ "overflow": "hidden",
"width": 18,
}
}
@@ -1786,79 +1757,68 @@ exports[`renders loading button 1`] = `
collapsable={false}
style={
Object {
- "height": 9,
- "overflow": "hidden",
+ "borderColor": "rgba(103, 80, 164, 1)",
+ "borderRadius": 9,
+ "borderWidth": 1.8,
+ "height": 18,
"width": 18,
}
}
- >
-
-
+ />
-
+
- Loading Button
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Loading Button
+
@@ -1871,10 +1831,14 @@ exports[`renders outlined button with mode 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1886,6 +1850,8 @@ exports[`renders outlined button with mode 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -1894,7 +1860,13 @@ exports[`renders outlined button with mode 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 1,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1904,116 +1876,100 @@ exports[`renders outlined button with mode 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
- Outlined Button
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Outlined Button
+
@@ -2026,10 +1982,14 @@ exports[`renders text button by default 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -2041,6 +2001,8 @@ exports[`renders text button by default 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -2049,7 +2011,13 @@ exports[`renders text button by default 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "transparent",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -2059,115 +2027,99 @@ exports[`renders text button by default 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
- Text Button
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Text Button
+
@@ -2180,10 +2132,14 @@ exports[`renders text button with mode 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -2195,6 +2151,8 @@ exports[`renders text button with mode 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -2203,7 +2161,13 @@ exports[`renders text button with mode 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "transparent",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -2213,115 +2177,99 @@ exports[`renders text button with mode 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
- Text Button
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Text Button
+
diff --git a/src/components/__tests__/__snapshots__/Chip.test.tsx.snap b/src/components/__tests__/__snapshots__/Chip.test.tsx.snap
index d239026598..7706df508a 100644
--- a/src/components/__tests__/__snapshots__/Chip.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/Chip.test.tsx.snap
@@ -6,10 +6,14 @@ exports[`renders chip with close button 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderRadius": 8,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -21,6 +25,8 @@ exports[`renders chip with close button 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="chip-container-outer-layer"
@@ -29,7 +35,13 @@ exports[`renders chip with close button 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 8,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "flexDirection": "column",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -39,200 +51,66 @@ exports[`renders chip with close button 1`] = `
"shadowRadius": 0,
}
}
- testID="chip-container-inner-layer"
+ testID="chip-container"
>
-
-
-
-
-
-
- Example Chip
-
-
-
-
-
@@ -258,7 +134,7 @@ exports[`renders chip with close button 1`] = `
style={
Array [
Object {
- "color": "rgba(29, 25, 43, 1)",
+ "color": "rgba(103, 80, 164, 1)",
"fontSize": 18,
},
Array [
@@ -283,9 +159,129 @@ exports[`renders chip with close button 1`] = `
]
}
>
-
+
+
+ Example Chip
+
+
+
+
+
+
+
+
@@ -298,10 +294,14 @@ exports[`renders chip with custom close button 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderRadius": 8,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -313,6 +313,8 @@ exports[`renders chip with custom close button 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="chip-container-outer-layer"
@@ -321,7 +323,13 @@ exports[`renders chip with custom close button 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 8,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "flexDirection": "column",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -331,200 +339,66 @@ exports[`renders chip with custom close button 1`] = `
"shadowRadius": 0,
}
}
- testID="chip-container-inner-layer"
+ testID="chip-container"
>
-
-
-
-
-
-
-
- Example Chip
-
-
-
-
@@ -550,7 +422,7 @@ exports[`renders chip with custom close button 1`] = `
style={
Array [
Object {
- "color": "rgba(29, 25, 43, 1)",
+ "color": "rgba(103, 80, 164, 1)",
"fontSize": 18,
},
Array [
@@ -575,9 +447,129 @@ exports[`renders chip with custom close button 1`] = `
]
}
>
-
+
+
+ Example Chip
+
+
+
+
+
+
+
+
@@ -590,10 +582,14 @@ exports[`renders chip with icon 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderRadius": 8,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -605,6 +601,8 @@ exports[`renders chip with icon 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="chip-container-outer-layer"
@@ -613,7 +611,13 @@ exports[`renders chip with icon 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 8,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "flexDirection": "column",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -623,138 +627,143 @@ exports[`renders chip with icon 1`] = `
"shadowRadius": 0,
}
}
- testID="chip-container-inner-layer"
+ testID="chip-container"
>
-
-
-
-
-
-
+
+
+
+
- Example Chip
-
-
+ undefined,
+ ],
+ ]
+ }
+ >
+ Example Chip
+
@@ -805,10 +793,14 @@ exports[`renders chip with onPress 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderRadius": 8,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -820,6 +812,8 @@ exports[`renders chip with onPress 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="chip-container-outer-layer"
@@ -828,7 +822,13 @@ exports[`renders chip with onPress 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 8,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "flexDirection": "column",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -838,86 +838,91 @@ exports[`renders chip with onPress 1`] = `
"shadowRadius": 0,
}
}
- testID="chip-container-inner-layer"
+ testID="chip-container"
>
-
-
- Example Chip
-
-
+ undefined,
+ ],
+ ]
+ }
+ >
+ Example Chip
+
@@ -968,10 +952,14 @@ exports[`renders outlined disabled chip 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 8,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -983,6 +971,8 @@ exports[`renders outlined disabled chip 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="chip-container-outer-layer"
@@ -991,7 +981,13 @@ exports[`renders outlined disabled chip 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(73, 69, 79, 0.12)",
+ "borderRadius": 8,
+ "borderStyle": "solid",
+ "borderWidth": 1,
"flex": undefined,
+ "flexDirection": "column",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1001,86 +997,91 @@ exports[`renders outlined disabled chip 1`] = `
"shadowRadius": 0,
}
}
- testID="chip-container-inner-layer"
+ testID="chip-container"
>
-
-
- Example Chip
-
-
+ undefined,
+ ],
+ ]
+ }
+ >
+ Example Chip
+
@@ -1131,10 +1111,14 @@ exports[`renders selected chip 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgb(232, 222, 248)",
+ "borderRadius": 8,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1146,6 +1130,8 @@ exports[`renders selected chip 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="chip-container-outer-layer"
@@ -1154,7 +1140,13 @@ exports[`renders selected chip 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgb(232, 222, 248)",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 8,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "flexDirection": "column",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1164,138 +1156,143 @@ exports[`renders selected chip 1`] = `
"shadowRadius": 0,
}
}
- testID="chip-container-inner-layer"
+ testID="chip-container"
>
-
-
-
-
-
-
+
+
+
+
- Example Chip
-
-
+ undefined,
+ ],
+ ]
+ }
+ >
+ Example Chip
+
diff --git a/src/components/__tests__/__snapshots__/DataTable.test.tsx.snap b/src/components/__tests__/__snapshots__/DataTable.test.tsx.snap
index 0eb3a44e9f..1cec04437d 100644
--- a/src/components/__tests__/__snapshots__/DataTable.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/DataTable.test.tsx.snap
@@ -269,10 +269,15 @@ exports[`renders data table pagination 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -284,6 +289,8 @@ exports[`renders data table pagination 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -292,7 +299,13 @@ exports[`renders data table pagination 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -302,114 +315,95 @@ exports[`renders data table pagination 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -418,10 +412,15 @@ exports[`renders data table pagination 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -433,6 +432,8 @@ exports[`renders data table pagination 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -441,7 +442,13 @@ exports[`renders data table pagination 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -451,114 +458,95 @@ exports[`renders data table pagination 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -625,10 +613,15 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -640,6 +633,8 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -648,7 +643,13 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -658,114 +659,95 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -774,10 +756,15 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -789,6 +776,8 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -797,7 +786,13 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -807,114 +802,95 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -923,10 +899,15 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -938,6 +919,8 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -946,7 +929,13 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -956,114 +945,95 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -1072,10 +1042,15 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1087,6 +1062,8 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -1095,7 +1072,13 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1105,114 +1088,95 @@ exports[`renders data table pagination with fast-forward buttons 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -1279,10 +1243,15 @@ exports[`renders data table pagination with label 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1294,6 +1263,8 @@ exports[`renders data table pagination with label 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -1302,7 +1273,13 @@ exports[`renders data table pagination with label 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1312,114 +1289,95 @@ exports[`renders data table pagination with label 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -1428,10 +1386,15 @@ exports[`renders data table pagination with label 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1443,6 +1406,8 @@ exports[`renders data table pagination with label 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -1451,7 +1416,13 @@ exports[`renders data table pagination with label 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1461,114 +1432,95 @@ exports[`renders data table pagination with label 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -1641,10 +1593,15 @@ exports[`renders data table pagination with options select 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "marginRight": 16,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1656,6 +1613,8 @@ exports[`renders data table pagination with options select 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -1664,7 +1623,13 @@ exports[`renders data table pagination with options select 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 1,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1672,175 +1637,158 @@ exports[`renders data table pagination with options select 1`] = `
},
"shadowOpacity": 0,
"shadowRadius": 0,
+ "textAlign": "center",
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
-
-
-
- 2
+
+
+ 2
+
@@ -1890,10 +1838,15 @@ exports[`renders data table pagination with options select 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1905,6 +1858,8 @@ exports[`renders data table pagination with options select 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -1913,7 +1868,13 @@ exports[`renders data table pagination with options select 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1923,114 +1884,95 @@ exports[`renders data table pagination with options select 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -2039,10 +1981,15 @@ exports[`renders data table pagination with options select 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -2054,6 +2001,8 @@ exports[`renders data table pagination with options select 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -2062,7 +2011,13 @@ exports[`renders data table pagination with options select 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -2072,114 +2027,95 @@ exports[`renders data table pagination with options select 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -2188,10 +2124,15 @@ exports[`renders data table pagination with options select 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -2203,6 +2144,8 @@ exports[`renders data table pagination with options select 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -2211,7 +2154,13 @@ exports[`renders data table pagination with options select 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -2221,114 +2170,95 @@ exports[`renders data table pagination with options select 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -2337,10 +2267,15 @@ exports[`renders data table pagination with options select 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -2352,6 +2287,8 @@ exports[`renders data table pagination with options select 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -2360,7 +2297,13 @@ exports[`renders data table pagination with options select 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -2370,114 +2313,95 @@ exports[`renders data table pagination with options select 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
diff --git a/src/components/__tests__/__snapshots__/FAB.test.tsx.snap b/src/components/__tests__/__snapshots__/FAB.test.tsx.snap
index 8b6b6b902a..5fec1a8679 100644
--- a/src/components/__tests__/__snapshots__/FAB.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/FAB.test.tsx.snap
@@ -6,10 +6,14 @@ exports[`renders FAB with custom size prop 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(234, 221, 255, 1)",
+ "borderRadius": 25,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -21,14 +25,23 @@ exports[`renders FAB with custom size prop 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="fab-container-outer-layer"
>
-
-
-
-
-
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
@@ -191,10 +186,14 @@ exports[`renders custom color for the icon and label of the FAB 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(234, 221, 255, 1)",
+ "borderRadius": 16,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -206,14 +205,23 @@ exports[`renders custom color for the icon and label of the FAB 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="fab-container-outer-layer"
>
-
-
-
-
-
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
@@ -376,10 +366,14 @@ exports[`renders default FAB 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(234, 221, 255, 1)",
+ "borderRadius": 16,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -391,14 +385,23 @@ exports[`renders default FAB 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="fab-container-outer-layer"
>
-
-
-
-
-
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
@@ -561,10 +546,14 @@ exports[`renders disabled FAB 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(28, 27, 31, 0.12)",
+ "borderRadius": 16,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -576,14 +565,23 @@ exports[`renders disabled FAB 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="fab-container-outer-layer"
>
-
-
-
-
-
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
@@ -746,10 +726,14 @@ exports[`renders extended FAB 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(234, 221, 255, 1)",
+ "borderRadius": 16,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -761,14 +745,23 @@ exports[`renders extended FAB 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="fab-container-outer-layer"
>
-
-
-
-
-
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
-
+
- Add items
-
-
+ ],
+ ]
+ }
+ testID="fab-text"
+ >
+ Add items
+
@@ -970,10 +945,14 @@ exports[`renders extended FAB with custom size prop 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(234, 221, 255, 1)",
+ "borderRadius": 25,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -985,14 +964,23 @@ exports[`renders extended FAB with custom size prop 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="fab-container-outer-layer"
>
-
+
-
-
-
-
-
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
-
+
- Add items
-
-
+ ],
+ ]
+ }
+ testID="fab-text"
+ >
+ Add items
+
@@ -1193,10 +1163,14 @@ exports[`renders large FAB 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(234, 221, 255, 1)",
+ "borderRadius": 28,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1208,14 +1182,23 @@ exports[`renders large FAB 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="fab-container-outer-layer"
>
-
-
-
-
-
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
@@ -1378,10 +1343,14 @@ exports[`renders loading FAB 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(234, 221, 255, 1)",
+ "borderRadius": 16,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1393,14 +1362,23 @@ exports[`renders loading FAB 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="fab-container-outer-layer"
>
@@ -1512,13 +1487,13 @@ exports[`renders loading FAB 1`] = `
collapsable={false}
style={
Object {
- "alignItems": "center",
- "bottom": 0,
- "justifyContent": "center",
- "left": 0,
- "position": "absolute",
- "right": 0,
- "top": 0,
+ "height": 18,
+ "transform": Array [
+ Object {
+ "rotate": "45deg",
+ },
+ ],
+ "width": 18,
}
}
>
@@ -1526,12 +1501,8 @@ exports[`renders loading FAB 1`] = `
collapsable={false}
style={
Object {
- "height": 18,
- "transform": Array [
- Object {
- "rotate": "45deg",
- },
- ],
+ "height": 9,
+ "overflow": "hidden",
"width": 18,
}
}
@@ -1540,8 +1511,15 @@ exports[`renders loading FAB 1`] = `
collapsable={false}
style={
Object {
- "height": 9,
- "overflow": "hidden",
+ "height": 18,
+ "transform": Array [
+ Object {
+ "translateY": 0,
+ },
+ Object {
+ "rotate": "-165deg",
+ },
+ ],
"width": 18,
}
}
@@ -1550,15 +1528,8 @@ exports[`renders loading FAB 1`] = `
collapsable={false}
style={
Object {
- "height": 18,
- "transform": Array [
- Object {
- "translateY": 0,
- },
- Object {
- "rotate": "-165deg",
- },
- ],
+ "height": 9,
+ "overflow": "hidden",
"width": 18,
}
}
@@ -1567,40 +1538,44 @@ exports[`renders loading FAB 1`] = `
collapsable={false}
style={
Object {
- "height": 9,
- "overflow": "hidden",
+ "borderColor": "rgba(33, 0, 93, 1)",
+ "borderRadius": 9,
+ "borderWidth": 1.8,
+ "height": 18,
"width": 18,
}
}
- >
-
-
+ />
+
+
@@ -1608,12 +1583,9 @@ exports[`renders loading FAB 1`] = `
collapsable={false}
style={
Object {
- "height": 18,
- "transform": Array [
- Object {
- "rotate": "45deg",
- },
- ],
+ "height": 9,
+ "overflow": "hidden",
+ "top": 9,
"width": 18,
}
}
@@ -1622,9 +1594,15 @@ exports[`renders loading FAB 1`] = `
collapsable={false}
style={
Object {
- "height": 9,
- "overflow": "hidden",
- "top": 9,
+ "height": 18,
+ "transform": Array [
+ Object {
+ "translateY": -9,
+ },
+ Object {
+ "rotate": "345deg",
+ },
+ ],
"width": 18,
}
}
@@ -1633,15 +1611,8 @@ exports[`renders loading FAB 1`] = `
collapsable={false}
style={
Object {
- "height": 18,
- "transform": Array [
- Object {
- "translateY": -9,
- },
- Object {
- "rotate": "345deg",
- },
- ],
+ "height": 9,
+ "overflow": "hidden",
"width": 18,
}
}
@@ -1650,25 +1621,14 @@ exports[`renders loading FAB 1`] = `
collapsable={false}
style={
Object {
- "height": 9,
- "overflow": "hidden",
+ "borderColor": "rgba(33, 0, 93, 1)",
+ "borderRadius": 9,
+ "borderWidth": 1.8,
+ "height": 18,
"width": 18,
}
}
- >
-
-
+ />
@@ -1688,10 +1648,14 @@ exports[`renders loading FAB with custom size prop 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(234, 221, 255, 1)",
+ "borderRadius": 25,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1703,14 +1667,23 @@ exports[`renders loading FAB with custom size prop 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="fab-container-outer-layer"
>
@@ -1822,13 +1792,13 @@ exports[`renders loading FAB with custom size prop 1`] = `
collapsable={false}
style={
Object {
- "alignItems": "center",
- "bottom": 0,
- "justifyContent": "center",
- "left": 0,
- "position": "absolute",
- "right": 0,
- "top": 0,
+ "height": 50,
+ "transform": Array [
+ Object {
+ "rotate": "45deg",
+ },
+ ],
+ "width": 50,
}
}
>
@@ -1836,12 +1806,8 @@ exports[`renders loading FAB with custom size prop 1`] = `
collapsable={false}
style={
Object {
- "height": 50,
- "transform": Array [
- Object {
- "rotate": "45deg",
- },
- ],
+ "height": 25,
+ "overflow": "hidden",
"width": 50,
}
}
@@ -1850,8 +1816,15 @@ exports[`renders loading FAB with custom size prop 1`] = `
collapsable={false}
style={
Object {
- "height": 25,
- "overflow": "hidden",
+ "height": 50,
+ "transform": Array [
+ Object {
+ "translateY": 0,
+ },
+ Object {
+ "rotate": "-165deg",
+ },
+ ],
"width": 50,
}
}
@@ -1860,15 +1833,8 @@ exports[`renders loading FAB with custom size prop 1`] = `
collapsable={false}
style={
Object {
- "height": 50,
- "transform": Array [
- Object {
- "translateY": 0,
- },
- Object {
- "rotate": "-165deg",
- },
- ],
+ "height": 25,
+ "overflow": "hidden",
"width": 50,
}
}
@@ -1877,40 +1843,44 @@ exports[`renders loading FAB with custom size prop 1`] = `
collapsable={false}
style={
Object {
- "height": 25,
- "overflow": "hidden",
+ "borderColor": "rgba(33, 0, 93, 1)",
+ "borderRadius": 25,
+ "borderWidth": 5,
+ "height": 50,
"width": 50,
}
}
- >
-
-
+ />
+
+
@@ -1918,12 +1888,9 @@ exports[`renders loading FAB with custom size prop 1`] = `
collapsable={false}
style={
Object {
- "height": 50,
- "transform": Array [
- Object {
- "rotate": "45deg",
- },
- ],
+ "height": 25,
+ "overflow": "hidden",
+ "top": 25,
"width": 50,
}
}
@@ -1932,9 +1899,15 @@ exports[`renders loading FAB with custom size prop 1`] = `
collapsable={false}
style={
Object {
- "height": 25,
- "overflow": "hidden",
- "top": 25,
+ "height": 50,
+ "transform": Array [
+ Object {
+ "translateY": -25,
+ },
+ Object {
+ "rotate": "345deg",
+ },
+ ],
"width": 50,
}
}
@@ -1943,15 +1916,8 @@ exports[`renders loading FAB with custom size prop 1`] = `
collapsable={false}
style={
Object {
- "height": 50,
- "transform": Array [
- Object {
- "translateY": -25,
- },
- Object {
- "rotate": "345deg",
- },
- ],
+ "height": 25,
+ "overflow": "hidden",
"width": 50,
}
}
@@ -1960,25 +1926,14 @@ exports[`renders loading FAB with custom size prop 1`] = `
collapsable={false}
style={
Object {
- "height": 25,
- "overflow": "hidden",
+ "borderColor": "rgba(33, 0, 93, 1)",
+ "borderRadius": 25,
+ "borderWidth": 5,
+ "height": 50,
"width": 50,
}
}
- >
-
-
+ />
@@ -1998,10 +1953,14 @@ exports[`renders not visible FAB 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(234, 221, 255, 1)",
+ "borderRadius": 16,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -2013,14 +1972,23 @@ exports[`renders not visible FAB 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="fab-container-outer-layer"
>
-
-
-
-
-
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
@@ -2183,10 +2133,14 @@ exports[`renders small FAB 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(234, 221, 255, 1)",
+ "borderRadius": 12,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -2198,14 +2152,23 @@ exports[`renders small FAB 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="fab-container-outer-layer"
>
-
-
-
-
-
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
@@ -2368,10 +2313,14 @@ exports[`renders visible FAB 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(234, 221, 255, 1)",
+ "borderRadius": 16,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 0,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -2383,14 +2332,23 @@ exports[`renders visible FAB 1`] = `
"shadowRadius": 8,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 0,
+ },
+ ],
+ "width": undefined,
}
}
testID="fab-container-outer-layer"
>
-
-
-
-
-
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
diff --git a/src/components/__tests__/__snapshots__/IconButton.test.tsx.snap b/src/components/__tests__/__snapshots__/IconButton.test.tsx.snap
index 2d3547e034..aa07f434d2 100644
--- a/src/components/__tests__/__snapshots__/IconButton.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/IconButton.test.tsx.snap
@@ -6,10 +6,15 @@ exports[`renders disabled icon button 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -21,6 +26,8 @@ exports[`renders disabled icon button 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -29,7 +36,13 @@ exports[`renders disabled icon button 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(28, 27, 31, 0.12)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -39,118 +52,99 @@ exports[`renders disabled icon button 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -162,10 +156,15 @@ exports[`renders icon button by default 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -177,6 +176,8 @@ exports[`renders icon button by default 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -185,7 +186,13 @@ exports[`renders icon button by default 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -195,113 +202,94 @@ exports[`renders icon button by default 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -313,10 +301,15 @@ exports[`renders icon button with color 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -328,6 +321,8 @@ exports[`renders icon button with color 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -336,7 +331,13 @@ exports[`renders icon button with color 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -346,113 +347,94 @@ exports[`renders icon button with color 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -464,10 +446,15 @@ exports[`renders icon button with size 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 23,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 46,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -479,6 +466,8 @@ exports[`renders icon button with size 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 46,
}
}
testID="icon-button-container-outer-layer"
@@ -487,7 +476,13 @@ exports[`renders icon button with size 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 23,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -497,113 +492,94 @@ exports[`renders icon button with size 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -615,10 +591,15 @@ exports[`renders icon change animated 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 6,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -630,6 +611,8 @@ exports[`renders icon change animated 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="icon-button-container-outer-layer"
@@ -638,7 +621,13 @@ exports[`renders icon change animated 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -648,145 +637,126 @@ exports[`renders icon change animated 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
-
-
-
-
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
diff --git a/src/components/__tests__/__snapshots__/ListItem.test.tsx.snap b/src/components/__tests__/__snapshots__/ListItem.test.tsx.snap
index 77a3f87cbc..3de447dbad 100644
--- a/src/components/__tests__/__snapshots__/ListItem.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/ListItem.test.tsx.snap
@@ -103,10 +103,14 @@ exports[`renders list item with custom description 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderRadius": 8,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -118,6 +122,8 @@ exports[`renders list item with custom description 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="chip-container-outer-layer"
@@ -126,7 +132,13 @@ exports[`renders list item with custom description 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "rgba(232, 222, 248, 1)",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 8,
+ "borderStyle": "solid",
+ "borderWidth": 0,
"flex": undefined,
+ "flexDirection": "column",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -136,138 +148,143 @@ exports[`renders list item with custom description 1`] = `
"shadowRadius": 0,
}
}
- testID="chip-container-inner-layer"
+ testID="chip-container"
>
-
-
-
-
-
-
+
+
+
+
- DOCS.pdf
-
-
+ undefined,
+ ],
+ ]
+ }
+ >
+ DOCS.pdf
+
diff --git a/src/components/__tests__/__snapshots__/Menu.test.tsx.snap b/src/components/__tests__/__snapshots__/Menu.test.tsx.snap
index 5b3bdd5b3b..daa8f91b9c 100644
--- a/src/components/__tests__/__snapshots__/Menu.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/Menu.test.tsx.snap
@@ -19,10 +19,14 @@ Array [
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -34,6 +38,8 @@ Array [
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -42,7 +48,13 @@ Array [
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 1,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -52,116 +64,100 @@ Array [
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
- Open menu
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Open menu
+
@@ -241,10 +237,16 @@ Array [
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgb(243, 237, 246)",
+ "borderRadius": 4,
+ "borderTopLeftRadius": 0,
+ "borderTopRightRadius": 0,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 0,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -256,6 +258,15 @@ Array [
"shadowRadius": 6,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scaleX": 0,
+ },
+ Object {
+ "scaleY": 0,
+ },
+ ],
+ "width": undefined,
}
}
testID="menu-surface-outer-layer"
@@ -264,7 +275,12 @@ Array [
collapsable={false}
style={
Object {
+ "backgroundColor": "rgb(243, 237, 246)",
+ "borderRadius": 4,
+ "borderTopLeftRadius": 0,
+ "borderTopRightRadius": 0,
"flex": undefined,
+ "paddingVertical": 8,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 1,
@@ -274,243 +290,219 @@ Array [
"shadowRadius": 2,
}
}
- testID="menu-surface-inner-layer"
+ testID="menu-surface"
>
+
-
-
-
- Undo
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="menu-item-title"
+ >
+ Undo
+
+
+
+
-
-
-
- Redo
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="menu-item-title"
+ >
+ Redo
+
@@ -540,10 +532,14 @@ exports[`renders not visible menu 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -555,6 +551,8 @@ exports[`renders not visible menu 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -563,7 +561,13 @@ exports[`renders not visible menu 1`] = `
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 1,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -573,116 +577,100 @@ exports[`renders not visible menu 1`] = `
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
- Open menu
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Open menu
+
@@ -710,10 +698,14 @@ Array [
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -725,6 +717,8 @@ Array [
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="button-container-outer-layer"
@@ -733,7 +727,13 @@ Array [
collapsable={false}
style={
Object {
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderStyle": "solid",
+ "borderWidth": 1,
"flex": undefined,
+ "minWidth": 64,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -743,116 +743,100 @@ Array [
"shadowRadius": 0,
}
}
- testID="button-container-inner-layer"
+ testID="button-container"
>
-
-
- Open menu
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Open menu
+
@@ -932,10 +916,14 @@ Array [
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgb(243, 237, 246)",
+ "borderRadius": 4,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": 0,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -947,6 +935,15 @@ Array [
"shadowRadius": 6,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scaleX": 0,
+ },
+ Object {
+ "scaleY": 0,
+ },
+ ],
+ "width": undefined,
}
}
testID="menu-surface-outer-layer"
@@ -955,7 +952,10 @@ Array [
collapsable={false}
style={
Object {
+ "backgroundColor": "rgb(243, 237, 246)",
+ "borderRadius": 4,
"flex": undefined,
+ "paddingVertical": 8,
"shadowColor": "#000",
"shadowOffset": Object {
"height": 1,
@@ -965,241 +965,219 @@ Array [
"shadowRadius": 2,
}
}
- testID="menu-surface-inner-layer"
+ testID="menu-surface"
>
+
-
-
-
- Undo
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="menu-item-title"
+ >
+ Undo
+
+
+
+
-
-
-
- Redo
-
-
+ undefined,
+ ],
+ ]
+ }
+ testID="menu-item-title"
+ >
+ Redo
+
diff --git a/src/components/__tests__/__snapshots__/Searchbar.test.tsx.snap b/src/components/__tests__/__snapshots__/Searchbar.test.tsx.snap
index 78c1a22642..37c0404991 100644
--- a/src/components/__tests__/__snapshots__/Searchbar.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/Searchbar.test.tsx.snap
@@ -6,10 +6,14 @@ exports[`activity indicator snapshot test 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgb(238, 232, 244)",
+ "borderRadius": 28,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -21,6 +25,8 @@ exports[`activity indicator snapshot test 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="search-bar-container-outer-layer"
@@ -29,7 +35,11 @@ exports[`activity indicator snapshot test 1`] = `
collapsable={false}
style={
Object {
+ "alignItems": "center",
+ "backgroundColor": "rgb(238, 232, 244)",
+ "borderRadius": 28,
"flex": undefined,
+ "flexDirection": "row",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -39,32 +49,50 @@ exports[`activity indicator snapshot test 1`] = `
"shadowRadius": 0,
}
}
- testID="search-bar-container-inner-layer"
+ testID="search-bar-container"
>
-
-
+
-
-
-
-
-
+ },
+ Object {
+ "backgroundColor": "transparent",
+ },
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
-
+
+
+ }
+ accessible={true}
+ style={
+ Array [
+ Object {
+ "alignItems": "center",
+ "justifyContent": "center",
+ },
+ Object {
+ "marginHorizontal": 16,
+ },
+ ]
+ }
+ testID="activity-indicator"
+ >
@@ -274,13 +279,13 @@ exports[`activity indicator snapshot test 1`] = `
collapsable={false}
style={
Object {
- "alignItems": "center",
- "bottom": 0,
- "justifyContent": "center",
- "left": 0,
- "position": "absolute",
- "right": 0,
- "top": 0,
+ "height": 24,
+ "transform": Array [
+ Object {
+ "rotate": "45deg",
+ },
+ ],
+ "width": 24,
}
}
>
@@ -288,12 +293,8 @@ exports[`activity indicator snapshot test 1`] = `
collapsable={false}
style={
Object {
- "height": 24,
- "transform": Array [
- Object {
- "rotate": "45deg",
- },
- ],
+ "height": 12,
+ "overflow": "hidden",
"width": 24,
}
}
@@ -302,8 +303,15 @@ exports[`activity indicator snapshot test 1`] = `
collapsable={false}
style={
Object {
- "height": 12,
- "overflow": "hidden",
+ "height": 24,
+ "transform": Array [
+ Object {
+ "translateY": 0,
+ },
+ Object {
+ "rotate": "-165deg",
+ },
+ ],
"width": 24,
}
}
@@ -312,15 +320,8 @@ exports[`activity indicator snapshot test 1`] = `
collapsable={false}
style={
Object {
- "height": 24,
- "transform": Array [
- Object {
- "translateY": 0,
- },
- Object {
- "rotate": "-165deg",
- },
- ],
+ "height": 12,
+ "overflow": "hidden",
"width": 24,
}
}
@@ -329,40 +330,44 @@ exports[`activity indicator snapshot test 1`] = `
collapsable={false}
style={
Object {
- "height": 12,
- "overflow": "hidden",
+ "borderColor": "rgba(103, 80, 164, 1)",
+ "borderRadius": 12,
+ "borderWidth": 2.4,
+ "height": 24,
"width": 24,
}
}
- >
-
-
+ />
+
+
@@ -370,12 +375,9 @@ exports[`activity indicator snapshot test 1`] = `
collapsable={false}
style={
Object {
- "height": 24,
- "transform": Array [
- Object {
- "rotate": "45deg",
- },
- ],
+ "height": 12,
+ "overflow": "hidden",
+ "top": 12,
"width": 24,
}
}
@@ -384,9 +386,15 @@ exports[`activity indicator snapshot test 1`] = `
collapsable={false}
style={
Object {
- "height": 12,
- "overflow": "hidden",
- "top": 12,
+ "height": 24,
+ "transform": Array [
+ Object {
+ "translateY": -12,
+ },
+ Object {
+ "rotate": "345deg",
+ },
+ ],
"width": 24,
}
}
@@ -395,15 +403,8 @@ exports[`activity indicator snapshot test 1`] = `
collapsable={false}
style={
Object {
- "height": 24,
- "transform": Array [
- Object {
- "translateY": -12,
- },
- Object {
- "rotate": "345deg",
- },
- ],
+ "height": 12,
+ "overflow": "hidden",
"width": 24,
}
}
@@ -412,25 +413,14 @@ exports[`activity indicator snapshot test 1`] = `
collapsable={false}
style={
Object {
- "height": 12,
- "overflow": "hidden",
+ "borderColor": "rgba(103, 80, 164, 1)",
+ "borderRadius": 12,
+ "borderWidth": 2.4,
+ "height": 24,
"width": 24,
}
}
- >
-
-
+ />
@@ -448,10 +438,14 @@ exports[`renders with placeholder 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgb(238, 232, 244)",
+ "borderRadius": 28,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -463,6 +457,8 @@ exports[`renders with placeholder 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="search-bar-container-outer-layer"
@@ -471,7 +467,11 @@ exports[`renders with placeholder 1`] = `
collapsable={false}
style={
Object {
+ "alignItems": "center",
+ "backgroundColor": "rgb(238, 232, 244)",
+ "borderRadius": 28,
"flex": undefined,
+ "flexDirection": "row",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -481,30 +481,215 @@ exports[`renders with placeholder 1`] = `
"shadowRadius": 0,
}
}
- testID="search-bar-container-inner-layer"
+ testID="search-bar-container"
>
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -856,10 +830,14 @@ exports[`renders with text 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgb(238, 232, 244)",
+ "borderRadius": 28,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -871,6 +849,8 @@ exports[`renders with text 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": undefined,
}
}
testID="search-bar-container-outer-layer"
@@ -879,7 +859,11 @@ exports[`renders with text 1`] = `
collapsable={false}
style={
Object {
+ "alignItems": "center",
+ "backgroundColor": "rgb(238, 232, 244)",
+ "borderRadius": 28,
"flex": undefined,
+ "flexDirection": "row",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -889,32 +873,50 @@ exports[`renders with text 1`] = `
"shadowRadius": 0,
}
}
- testID="search-bar-container-inner-layer"
+ testID="search-bar-container"
>
-
-
+
-
-
-
-
-
+ },
+ Object {
+ "backgroundColor": "transparent",
+ },
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
-
+
+
+
-
-
+
-
-
-
-
-
+ },
+ Object {
+ "backgroundColor": "transparent",
+ },
+ ],
+ Object {
+ "fontFamily": "Material Design Icons",
+ "fontStyle": "normal",
+ "fontWeight": "normal",
+ },
+ Object {},
+ ]
+ }
+ >
+
+
diff --git a/src/components/__tests__/__snapshots__/Snackbar.test.tsx.snap b/src/components/__tests__/__snapshots__/Snackbar.test.tsx.snap
index 22db9eaae1..d913e9979d 100644
--- a/src/components/__tests__/__snapshots__/Snackbar.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/Snackbar.test.tsx.snap
@@ -25,10 +25,15 @@ exports[`renders snackbar with Text as a child 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(49, 48, 51, 1)",
+ "borderRadius": 4,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "margin": 8,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -40,15 +45,28 @@ exports[`renders snackbar with Text as a child 1`] = `
"shadowRadius": 6,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="surface-outer-layer"
>
-
-
-
- Snackbar content
-
-
+
+
+ Snackbar content
+
@@ -127,10 +121,15 @@ exports[`renders snackbar with View & Text as a child 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(49, 48, 51, 1)",
+ "borderRadius": 4,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "margin": 8,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -142,15 +141,28 @@ exports[`renders snackbar with View & Text as a child 1`] = `
"shadowRadius": 6,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="surface-outer-layer"
>
-
+
-
+ >
-
-
+
- Error Message which is veryyyyyyyyyyyy longggggggg Error Message which is veryyyyyyyyyyyy longggggggg
-
-
+ }
+ >
+ Error Message which is veryyyyyyyyyyyy longggggggg Error Message which is veryyyyyyyyyyyy longggggggg
+
@@ -255,10 +243,15 @@ exports[`renders snackbar with action button 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(49, 48, 51, 1)",
+ "borderRadius": 4,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "margin": 8,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -270,15 +263,28 @@ exports[`renders snackbar with action button 1`] = `
"shadowRadius": 6,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="surface-outer-layer"
>
-
-
- Snackbar content
-
+ ],
+ ]
+ }
+ >
+ Snackbar content
+
+
-
-
-
- Undo
-
-
-
+ ],
+ ]
+ }
+ testID="button-text"
+ >
+ Undo
+
@@ -543,10 +521,15 @@ exports[`renders snackbar with content 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(49, 48, 51, 1)",
+ "borderRadius": 4,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": undefined,
"left": undefined,
+ "margin": 8,
+ "opacity": 1,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -558,15 +541,28 @@ exports[`renders snackbar with content 1`] = `
"shadowRadius": 6,
"start": undefined,
"top": undefined,
+ "transform": Array [
+ Object {
+ "scale": 1,
+ },
+ ],
+ "width": undefined,
}
}
testID="surface-outer-layer"
>
-
-
- Snackbar content
-
-
+ ],
+ ]
+ }
+ >
+ Snackbar content
+
diff --git a/src/components/__tests__/__snapshots__/TextInput.test.tsx.snap b/src/components/__tests__/__snapshots__/TextInput.test.tsx.snap
index 91a4975518..d397e7558e 100644
--- a/src/components/__tests__/__snapshots__/TextInput.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/TextInput.test.tsx.snap
@@ -1268,10 +1268,15 @@ exports[`correctly renders left-side affix adornment, and right-side icon adornm
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 0,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1283,6 +1288,8 @@ exports[`correctly renders left-side affix adornment, and right-side icon adornm
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="right-icon-adornment-container-outer-layer"
@@ -1291,7 +1298,13 @@ exports[`correctly renders left-side affix adornment, and right-side icon adornm
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1301,113 +1314,94 @@ exports[`correctly renders left-side affix adornment, and right-side icon adornm
"shadowRadius": 0,
}
}
- testID="right-icon-adornment-container-inner-layer"
+ testID="right-icon-adornment-container"
>
-
+
-
-
-
-
+
+
@@ -1630,10 +1624,15 @@ exports[`correctly renders left-side icon adornment, and right-side affix adornm
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 20,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 40,
"left": undefined,
+ "margin": 0,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -1645,6 +1644,8 @@ exports[`correctly renders left-side icon adornment, and right-side affix adornm
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 40,
}
}
testID="left-icon-adornment-container-outer-layer"
@@ -1653,7 +1654,13 @@ exports[`correctly renders left-side icon adornment, and right-side affix adornm
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 20,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -1663,113 +1670,94 @@ exports[`correctly renders left-side icon adornment, and right-side affix adornm
"shadowRadius": 0,
}
}
- testID="left-icon-adornment-container-inner-layer"
+ testID="left-icon-adornment-container"
>
-
+
-
-
-
-
+
+
diff --git a/src/components/__tests__/__snapshots__/ToggleButton.test.tsx.snap b/src/components/__tests__/__snapshots__/ToggleButton.test.tsx.snap
index 5f3768a9bb..5ff176c5c8 100644
--- a/src/components/__tests__/__snapshots__/ToggleButton.test.tsx.snap
+++ b/src/components/__tests__/__snapshots__/ToggleButton.test.tsx.snap
@@ -6,10 +6,15 @@ exports[`renders disabled toggle button 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(29, 25, 43, 0.12)",
+ "borderRadius": 4,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 42,
"left": undefined,
+ "margin": 0,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -21,6 +26,8 @@ exports[`renders disabled toggle button 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 42,
}
}
testID="icon-button-container-outer-layer"
@@ -29,7 +36,13 @@ exports[`renders disabled toggle button 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "rgba(29, 25, 43, 0.12)",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 4,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -39,117 +52,98 @@ exports[`renders disabled toggle button 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
@@ -161,10 +155,15 @@ exports[`renders toggle button 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "rgba(29, 25, 43, 0.12)",
+ "borderRadius": 4,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 42,
"left": undefined,
+ "margin": 0,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -176,6 +175,8 @@ exports[`renders toggle button 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 42,
}
}
testID="icon-button-container-outer-layer"
@@ -184,7 +185,13 @@ exports[`renders toggle button 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "rgba(29, 25, 43, 0.12)",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 4,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -194,112 +201,93 @@ exports[`renders toggle button 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
-
-
-
-
+
+
@@ -311,10 +299,15 @@ exports[`renders unchecked toggle button 1`] = `
style={
Object {
"alignSelf": undefined,
+ "backgroundColor": "transparent",
+ "borderRadius": 4,
"bottom": undefined,
"end": undefined,
"flex": undefined,
+ "height": 42,
"left": undefined,
+ "margin": 0,
+ "opacity": undefined,
"position": undefined,
"right": undefined,
"shadowColor": "#000",
@@ -326,6 +319,8 @@ exports[`renders unchecked toggle button 1`] = `
"shadowRadius": 0,
"start": undefined,
"top": undefined,
+ "transform": undefined,
+ "width": 42,
}
}
testID="icon-button-container-outer-layer"
@@ -334,7 +329,13 @@ exports[`renders unchecked toggle button 1`] = `
collapsable={false}
style={
Object {
- "flex": undefined,
+ "backgroundColor": "transparent",
+ "borderColor": "rgba(121, 116, 126, 1)",
+ "borderRadius": 4,
+ "borderWidth": 0,
+ "elevation": 0,
+ "flex": 1,
+ "overflow": "hidden",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 0,
@@ -344,117 +345,98 @@ exports[`renders unchecked toggle button 1`] = `
"shadowRadius": 0,
}
}
- testID="icon-button-container-inner-layer"
+ testID="icon-button-container"
>
-
+
-
-
-
-
+
+
diff --git a/src/utils/__tests__/splitStyles.test.ts b/src/utils/__tests__/splitStyles.test.ts
new file mode 100644
index 0000000000..7019159325
--- /dev/null
+++ b/src/utils/__tests__/splitStyles.test.ts
@@ -0,0 +1,84 @@
+import type { ViewStyle } from 'react-native';
+
+import { splitStyles } from '../splitStyles';
+
+describe('splitStyles', () => {
+ const styles: Readonly = Object.freeze({
+ backgroundColor: 'red',
+ marginTop: 1,
+ marginBottom: 2,
+ marginLeft: 3,
+ padding: 4,
+ borderTopLeftRadius: 5,
+ borderTopRightRadius: 6,
+ right: 4,
+ });
+
+ it('splits margins, paddings, and border radiuses correctly', () => {
+ const marginPredicate = (style: string) => style.startsWith('margin');
+ const paddingPredicate = (style: string) => style.startsWith('padding');
+ const borderRadiusPredicate = (style: string) =>
+ style.startsWith('border') && style.endsWith('Radius');
+ const [filteredStyles, marginStyles, paddingStyles, borderRadiusStyles] =
+ splitStyles(
+ styles,
+ marginPredicate,
+ paddingPredicate,
+ borderRadiusPredicate
+ );
+
+ expect(keysLength(filteredStyles)).toBeGreaterThan(0);
+ expect(keysLength(filteredStyles)).toBeLessThan(keysLength(styles));
+ for (const style in filteredStyles) {
+ expect(marginPredicate(style)).toBeFalsy();
+ expect(paddingPredicate(style)).toBeFalsy();
+ expect(borderRadiusPredicate(style)).toBeFalsy();
+ }
+
+ expect(keysLength(marginStyles)).toBeGreaterThan(0);
+ for (const style in marginStyles) {
+ expect(marginPredicate(style)).toBeTruthy();
+ }
+
+ expect(keysLength(paddingStyles)).toBeGreaterThan(0);
+ for (const style in paddingStyles) {
+ expect(paddingPredicate(style)).toBeTruthy();
+ }
+
+ expect(keysLength(borderRadiusStyles)).toBeGreaterThan(0);
+ for (const style in borderRadiusStyles) {
+ expect(borderRadiusPredicate(style)).toBeTruthy();
+ }
+ });
+
+ it('filtered styles is an empty object if all styles matched some predicate', () => {
+ const styles = {
+ margin: 5,
+ padding: 6,
+ };
+ const [filteredStyles] = splitStyles(
+ styles,
+ (style) => style.startsWith('margin'),
+ (style) => style.startsWith('padding')
+ );
+
+ expect(keysLength(filteredStyles)).toBe(0);
+ });
+
+ it('processes predicates in order', () => {
+ const [, marginStyles, marginStyles2, marginStyles3] = splitStyles(
+ styles,
+ (style) => style.startsWith('margin'),
+ (style) => style.startsWith('margin'),
+ (style) => style.startsWith('margin')
+ );
+
+ expect(keysLength(marginStyles)).toBeGreaterThan(0);
+ expect(keysLength(marginStyles2)).toBe(0);
+ expect(keysLength(marginStyles3)).toBe(0);
+ });
+});
+
+function keysLength(object: object): number {
+ return Object.keys(object).length;
+}
diff --git a/src/utils/splitStyles.ts b/src/utils/splitStyles.ts
new file mode 100644
index 0000000000..23d4573ce0
--- /dev/null
+++ b/src/utils/splitStyles.ts
@@ -0,0 +1,64 @@
+import type { ViewStyle } from 'react-native';
+
+type FiltersArray = readonly ((style: string) => boolean)[];
+
+type MappedTuple = {
+ [Index in keyof Tuple]: ViewStyle;
+} & { length: Tuple['length'] };
+
+type Style = ViewStyle[keyof ViewStyle];
+type Entry = [string, Style];
+
+/**
+ * Utility function to extract styles in separate objects
+ *
+ * @param styles The style object you want to filter
+ * @param filters The filters by which you want to split the styles
+ * @returns An array of filtered style objects:
+ * - The first style object contains the properties that didn't match any filter
+ * - After that there will be a style object for each filter you passed in the same order as the matching filters
+ * - A style property will exist in a single style object, the first filter it matched
+ */
+export function splitStyles(
+ styles: ViewStyle,
+ ...filters: Tuple
+) {
+ if (process.env.NODE_ENV !== 'production' && filters.length === 0) {
+ console.error('No filters were passed when calling splitStyles');
+ }
+
+ // `Object.entries` will be used to iterate over the styles and `Object.fromEntries` will be called before returning
+ // Entries which match the given filters will be temporarily stored in `newStyles`
+ const newStyles = filters.map(returnEmptyArray);
+
+ // Entries which match no filter
+ const rest: Entry[] = [];
+
+ // Iterate every style property
+ outer: for (const item of Object.entries(styles) as Entry[]) {
+ // Check each filter
+ for (let i = 0; i < filters.length; i++) {
+ // Check if filter matches
+ if (filters[i](item[0])) {
+ newStyles[i].push(item); // Push to temporary filtered entries array
+ continue outer; // Skip to checking next style property
+ }
+ }
+
+ // Adds to rest styles if not filtered
+ rest.push(item);
+ }
+
+ // Put unmatched styles in the beginning
+ newStyles.unshift(rest);
+
+ // Convert arrays of entries into objects
+ return newStyles.map((styles) => Object.fromEntries(styles)) as unknown as [
+ ViewStyle,
+ ...MappedTuple
+ ];
+}
+
+function returnEmptyArray() {
+ return [] as SomeArray[];
+}