@hero-design/rn 7.3.2 → 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.expo/README.md +15 -0
- package/.expo/packager-info.json +10 -0
- package/.expo/prebuild/cached-packages.json +4 -0
- package/.expo/settings.json +10 -0
- package/.expo/xcodebuild-error.log +2 -0
- package/.expo/xcodebuild.log +11199 -0
- package/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-build:types.log +2 -0
- package/.turbo/turbo-test.log +131 -0
- package/.turbo/turbo-type-check.log +7 -0
- package/assets/fonts/hero-icons.ttf +0 -0
- package/es/index.js +2012 -1137
- package/lib/assets/fonts/hero-icons.ttf +0 -0
- package/lib/index.js +2016 -1135
- package/package.json +11 -9
- package/playground/.detoxrc.json +49 -0
- package/playground/.prettierrc.json +8 -0
- package/playground/app.json +9 -0
- package/playground/babel.config.js +63 -0
- package/playground/e2e/config.json +9 -0
- package/playground/e2e/environment.js +23 -0
- package/playground/e2e/firstTest.e2e.js +16 -0
- package/{expoEntry.js → playground/expoEntry.js} +1 -1
- package/playground/fonts/be-vietnam-pro-light.ttf +0 -0
- package/playground/fonts/be-vietnam-pro-regular.ttf +0 -0
- package/playground/fonts/be-vietnam-pro-semibold.ttf +0 -0
- package/playground/fonts/hero-icons.ttf +0 -0
- package/playground/index.js +7 -0
- package/playground/ios/MobileHeroDesignPlayground/AppDelegate.h +9 -0
- package/playground/ios/MobileHeroDesignPlayground/AppDelegate.m +75 -0
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/AppIcon.appiconset/Contents.json +38 -0
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/Contents.json +6 -0
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/SplashScreenBackground.imageset/Contents.json +21 -0
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
- package/playground/ios/MobileHeroDesignPlayground/Info.plist +85 -0
- package/playground/ios/MobileHeroDesignPlayground/MobileHeroDesignPlayground-Bridging-Header.h +3 -0
- package/playground/ios/MobileHeroDesignPlayground/MobileHeroDesignPlayground.entitlements +8 -0
- package/playground/ios/MobileHeroDesignPlayground/SplashScreen.storyboard +40 -0
- package/playground/ios/MobileHeroDesignPlayground/Supporting/Expo.plist +16 -0
- package/playground/ios/MobileHeroDesignPlayground/main.m +10 -0
- package/playground/ios/MobileHeroDesignPlayground/noop-file.swift +4 -0
- package/playground/ios/MobileHeroDesignPlayground.xcodeproj/project.pbxproj +515 -0
- package/playground/ios/MobileHeroDesignPlayground.xcodeproj/xcshareddata/xcschemes/MobileHeroDesignPlayground.xcscheme +88 -0
- package/playground/ios/MobileHeroDesignPlayground.xcworkspace/contents.xcworkspacedata +10 -0
- package/playground/ios/MobileHeroDesignPlayground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/playground/ios/Podfile +49 -0
- package/playground/ios/Podfile.lock +478 -0
- package/playground/ios/Podfile.properties.json +3 -0
- package/{metro.config.js → playground/metro.config.js} +10 -2
- package/playground/package.json +63 -0
- package/playground/{index.tsx → src/App.tsx} +57 -29
- package/playground/{components → src}/Avatar.tsx +1 -1
- package/playground/{components → src}/Badge.tsx +1 -1
- package/playground/{components → src}/BottomNavigation.tsx +1 -1
- package/playground/src/BottomSheet.tsx +43 -0
- package/playground/src/Button.tsx +170 -0
- package/playground/{components/Button.tsx → src/Button.tsx~origin_master} +0 -0
- package/playground/{components → src}/Card.tsx +1 -1
- package/playground/{components → src}/Collapse.tsx +1 -1
- package/playground/src/ContentNavigator.tsx +65 -0
- package/playground/{components → src}/Divider.tsx +1 -1
- package/playground/{components → src}/Drawer.tsx +1 -1
- package/playground/{components → src}/FAB.tsx +1 -1
- package/playground/{components → src}/Icon.tsx +7 -3
- package/playground/{components → src}/IconButton.tsx +12 -1
- package/playground/{components → src}/Progress.tsx +1 -1
- package/playground/src/Radio.tsx +25 -0
- package/playground/src/SectionHeading.tsx +68 -0
- package/playground/src/Spinner.tsx +19 -0
- package/playground/{components → src}/Tabs.tsx +1 -1
- package/playground/{components → src}/Tag.tsx +1 -1
- package/playground/src/TextInput.tsx +14 -0
- package/playground/{components → src}/Typography.tsx +1 -1
- package/playground/src/emotion.d.ts +7 -0
- package/playground/tsconfig.json +21 -0
- package/src/components/BottomSheet/Footer.tsx +19 -0
- package/src/components/BottomSheet/Header.tsx +49 -0
- package/src/components/BottomSheet/StyledBottomSheet.tsx +75 -0
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +531 -0
- package/src/components/BottomSheet/__tests__/index.spec.tsx +107 -0
- package/src/components/BottomSheet/index.tsx +171 -0
- package/src/components/Button/IconButton.tsx +11 -1
- package/src/components/Collapse/StyledCollapse.tsx +11 -2
- package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +36 -31
- package/src/components/Collapse/__tests__/index.spec.tsx +1 -13
- package/src/components/Collapse/index.tsx +20 -50
- package/src/components/ContentNavigator/StyledContentNavigator.tsx +15 -0
- package/src/components/ContentNavigator/__tests__/StyledContentNavigator.spec.tsx +19 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +43 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +217 -0
- package/src/components/ContentNavigator/__tests__/index.spec.tsx +74 -0
- package/src/components/ContentNavigator/index.tsx +65 -0
- package/src/components/Icon/HeroIcon/index.tsx +13 -2
- package/src/components/Icon/HeroIcon/selection.json +1 -1
- package/src/components/Icon/IconList.ts +6 -0
- package/src/components/Icon/index.tsx +8 -1
- package/src/components/Radio/Radio.tsx +51 -0
- package/src/components/Radio/RadioGroup.tsx +50 -0
- package/src/components/Radio/StyledRadio.tsx +42 -0
- package/src/components/Radio/__tests__/Radio.spec.tsx +38 -0
- package/src/components/Radio/__tests__/RadioGroup.spec.tsx +36 -0
- package/src/components/Radio/__tests__/StyledRadio.spec.tsx +43 -0
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +160 -0
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +248 -0
- package/src/components/Radio/__tests__/__snapshots__/StyledRadio.spec.tsx.snap +124 -0
- package/src/components/Radio/index.tsx +5 -0
- package/src/components/SectionHeading/StyledHeading.tsx +24 -0
- package/src/components/SectionHeading/__tests__/StyledHeading.tsx +28 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.tsx.snap +48 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +208 -0
- package/src/components/SectionHeading/__tests__/index.spec.tsx +39 -0
- package/src/components/SectionHeading/index.tsx +93 -0
- package/src/components/Spinner/AnimatedSpinner.tsx +55 -0
- package/src/components/Spinner/StyledSpinner.tsx +59 -0
- package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +11 -0
- package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +56 -0
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +118 -0
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +235 -0
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +141 -0
- package/src/components/Spinner/__tests__/index.spec.tsx +12 -0
- package/src/components/Spinner/index.tsx +22 -0
- package/src/components/TextInput/StyledTextInput.tsx +34 -0
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +33 -0
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +88 -0
- package/src/components/TextInput/__tests__/index.spec.tsx +16 -0
- package/src/components/TextInput/index.tsx +61 -0
- package/src/index.ts +12 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +95 -0
- package/src/theme/components/bottomSheet.ts +34 -0
- package/src/theme/components/contentNavigator.ts +11 -0
- package/src/theme/components/icon.ts +1 -0
- package/src/theme/components/radio.ts +34 -0
- package/src/theme/components/spinner.ts +21 -0
- package/src/theme/components/textInput.ts +32 -0
- package/src/theme/global/borders.ts +6 -0
- package/src/theme/global/colors.ts +1 -0
- package/src/theme/index.ts +22 -7
- package/tsconfig.json +11 -3
- package/types/components/Avatar/StyledAvatar.d.ts +45 -0
- package/types/{src/components/Tabs/__tests__/ScrollableTab.spec.d.ts → components/Avatar/__tests__/StyledAvatar.spec.d.ts} +0 -0
- package/types/components/Avatar/__tests__/index.spec.d.ts +1 -0
- package/types/components/Avatar/index.d.ts +25 -0
- package/types/components/Badge/Status.d.ts +24 -0
- package/types/components/Badge/StyledBadge.d.ts +27 -0
- package/types/components/Badge/__tests__/Badge.spec.d.ts +1 -0
- package/types/components/Badge/__tests__/Status.spec.d.ts +1 -0
- package/types/components/Badge/index.d.ts +32 -0
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +51 -0
- package/types/components/BottomNavigation/__tests__/index.spec.d.ts +1 -0
- package/types/components/BottomNavigation/index.d.ts +45 -0
- package/types/components/BottomSheet/Footer.d.ts +6 -0
- package/types/components/BottomSheet/Header.d.ts +8 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +46 -0
- package/types/components/BottomSheet/__tests__/index.spec.d.ts +1 -0
- package/types/components/BottomSheet/index.d.ts +51 -0
- package/types/components/Button/Button.d.ts +57 -0
- package/types/components/Button/IconButton.d.ts +38 -0
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +19 -0
- package/types/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +1 -0
- package/types/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +1 -0
- package/types/components/Button/LoadingIndicator/index.d.ts +26 -0
- package/types/components/Button/StyledButton.d.ts +39 -0
- package/types/components/Button/__tests__/Button.spec.d.ts +1 -0
- package/types/components/Button/__tests__/IconButton.spec.d.ts +1 -0
- package/types/components/Button/__tests__/StyledButton.spec.d.ts +1 -0
- package/types/components/Button/index.d.ts +8 -0
- package/types/components/Card/StyledCard.d.ts +16 -0
- package/types/components/Card/__tests__/StyledCard.spec.d.ts +1 -0
- package/types/components/Card/__tests__/index.spec.d.ts +1 -0
- package/types/components/Card/index.d.ts +22 -0
- package/types/components/Collapse/StyledCollapse.d.ts +25 -0
- package/types/components/Collapse/__tests__/StyledCollapse.spec.d.ts +1 -0
- package/types/components/Collapse/__tests__/index.spec.d.ts +1 -0
- package/types/components/Collapse/index.d.ts +19 -0
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +12 -0
- package/types/components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts +1 -0
- package/types/components/ContentNavigator/__tests__/index.spec.d.ts +1 -0
- package/types/components/ContentNavigator/index.d.ts +33 -0
- package/types/components/Divider/StyledDivider.d.ts +12 -0
- package/types/components/Divider/__tests__/StyledDivider.spec.d.ts +1 -0
- package/types/components/Divider/index.d.ts +21 -0
- package/types/components/Drawer/StyledDrawer.d.ts +24 -0
- package/types/components/Drawer/__tests__/index.spec.d.ts +1 -0
- package/types/components/Drawer/index.d.ts +25 -0
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +12 -0
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +29 -0
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +12 -0
- package/types/components/FAB/ActionGroup/__tests__/index.spec.d.ts +1 -0
- package/types/components/FAB/ActionGroup/index.d.ts +34 -0
- package/types/components/FAB/AnimatedFABIcon.d.ts +6 -0
- package/types/components/FAB/FAB.d.ts +34 -0
- package/types/components/FAB/StyledFAB.d.ts +19 -0
- package/types/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +1 -0
- package/types/components/FAB/__tests__/StyledFAB.spec.d.ts +1 -0
- package/types/components/FAB/__tests__/index.spec.d.ts +1 -0
- package/types/components/FAB/index.d.ts +4 -0
- package/types/components/Icon/HeroIcon/index.d.ts +12 -0
- package/types/components/Icon/IconList.d.ts +2 -0
- package/types/components/Icon/__tests__/index.spec.d.ts +1 -0
- package/types/components/Icon/index.d.ts +27 -0
- package/types/components/Icon/utils.d.ts +2 -0
- package/types/components/Progress/ProgressBar.d.ts +18 -0
- package/types/components/Progress/ProgressCircle.d.ts +18 -0
- package/types/components/Progress/StyledProgressBar.d.ts +17 -0
- package/types/components/Progress/StyledProgressCircle.d.ts +37 -0
- package/types/components/Progress/__tests__/index.spec.d.ts +1 -0
- package/types/components/Progress/index.d.ts +5 -0
- package/types/components/Progress/types.d.ts +1 -0
- package/types/components/Radio/Radio.d.ts +26 -0
- package/types/components/Radio/RadioGroup.d.ts +29 -0
- package/types/components/Radio/StyledRadio.d.ts +30 -0
- package/types/components/Radio/__tests__/Radio.spec.d.ts +1 -0
- package/types/components/Radio/__tests__/RadioGroup.spec.d.ts +1 -0
- package/types/components/Radio/__tests__/StyledRadio.spec.d.ts +1 -0
- package/types/components/Radio/index.d.ts +4 -0
- package/types/components/SectionHeading/StyledHeading.d.ts +20 -0
- package/types/components/SectionHeading/__tests__/StyledHeading.d.ts +1 -0
- package/types/components/SectionHeading/__tests__/index.spec.d.ts +1 -0
- package/types/components/SectionHeading/index.d.ts +39 -0
- package/types/components/Spinner/AnimatedSpinner.d.ts +2 -0
- package/types/components/Spinner/StyledSpinner.d.ts +30 -0
- package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +1 -0
- package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +1 -0
- package/types/components/Spinner/__tests__/index.spec.d.ts +1 -0
- package/types/components/Spinner/index.d.ts +10 -0
- package/types/components/Tabs/ActiveTabIndicator.d.ts +8 -0
- package/types/{src/components/Tabs/ScrollableTab.d.ts → components/Tabs/ScrollableTabs.d.ts} +1 -1
- package/types/{src/components/Tabs/StyledScrollableTab.d.ts → components/Tabs/StyledScrollableTabs.d.ts} +0 -1
- package/types/components/Tabs/StyledTabs.d.ts +54 -0
- package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +1 -0
- package/types/components/Tabs/__tests__/index.spec.d.ts +1 -0
- package/types/components/Tabs/index.d.ts +54 -0
- package/types/components/Tabs/utils.d.ts +2 -0
- package/types/components/Tag/StyledTag.d.ts +19 -0
- package/types/components/Tag/__tests__/Tag.spec.d.ts +1 -0
- package/types/components/Tag/index.d.ts +21 -0
- package/types/components/TextInput/StyledTextInput.d.ts +22 -0
- package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +1 -0
- package/types/components/TextInput/__tests__/index.spec.d.ts +1 -0
- package/types/components/TextInput/index.d.ts +26 -0
- package/types/components/Typography/Text/StyledText.d.ts +12 -0
- package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +1 -0
- package/types/components/Typography/Text/__tests__/index.spec.d.ts +1 -0
- package/types/components/Typography/Text/index.d.ts +30 -0
- package/types/components/Typography/index.d.ts +6 -0
- package/types/index.d.ts +25 -0
- package/types/playground/components/IconButton.d.ts +0 -0
- package/types/src/components/Button/Button.d.ts +0 -0
- package/types/src/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
- package/types/src/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -0
- package/types/src/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +0 -0
- package/types/src/components/Button/LoadingIndicator/index.d.ts +0 -0
- package/types/src/components/Button/StyledButton.d.ts +0 -0
- package/types/src/components/Button/__tests__/Button.spec.d.ts +0 -0
- package/types/src/components/Button/__tests__/IconButton.spec.d.ts +0 -0
- package/types/src/components/Button/__tests__/StyledButton.spec.d.ts +0 -0
- package/types/src/theme/components/button.d.ts +0 -0
- package/types/testHelpers/renderWithTheme.d.ts +3 -0
- package/types/theme/__tests__/index.spec.d.ts +1 -0
- package/types/theme/components/avatar.d.ts +32 -0
- package/types/theme/components/badge.d.ts +29 -0
- package/types/theme/components/bottomNavigation.d.ts +23 -0
- package/types/theme/components/bottomSheet.d.ts +29 -0
- package/types/theme/components/button.d.ts +37 -0
- package/types/theme/components/card.d.ts +10 -0
- package/types/theme/components/contentNavigator.d.ts +7 -0
- package/types/theme/components/divider.d.ts +17 -0
- package/types/theme/components/drawer.d.ts +21 -0
- package/types/theme/components/fab.d.ts +51 -0
- package/types/theme/components/icon.d.ts +20 -0
- package/types/theme/components/progress.d.ts +21 -0
- package/types/theme/components/radio.d.ts +25 -0
- package/types/theme/components/spinner.d.ts +15 -0
- package/types/theme/components/tabs.d.ts +27 -0
- package/types/theme/components/tag.d.ts +30 -0
- package/types/theme/components/textInput.d.ts +24 -0
- package/types/theme/components/typography.d.ts +26 -0
- package/types/theme/global/borders.d.ts +14 -0
- package/types/theme/global/colors.d.ts +32 -0
- package/types/theme/global/index.d.ts +42 -0
- package/types/theme/global/scale.d.ts +9 -0
- package/types/theme/global/space.d.ts +13 -0
- package/types/theme/global/typography.d.ts +21 -0
- package/types/theme/index.d.ts +45 -0
- package/types/types.d.ts +5 -0
- package/types/utils/__tests__/scale.spec.d.ts +1 -0
- package/types/utils/helpers.d.ts +2 -0
- package/types/utils/hooks.d.ts +1 -0
- package/types/utils/scale.d.ts +3 -0
- package/app.json +0 -8
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text } from 'react-native';
|
|
3
|
+
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
4
|
+
import SectionHeading from '..';
|
|
5
|
+
|
|
6
|
+
describe('SectionHeading', () => {
|
|
7
|
+
it('renders correctly', () => {
|
|
8
|
+
const wrapper = renderWithTheme(
|
|
9
|
+
<SectionHeading testID="sectionHeading" text="test demo" />
|
|
10
|
+
);
|
|
11
|
+
expect(wrapper.queryAllByTestId('sectionHeading')).toHaveLength(1);
|
|
12
|
+
|
|
13
|
+
expect(wrapper.toJSON()).toMatchSnapshot();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('render icon correctly', () => {
|
|
17
|
+
const wrapper = renderWithTheme(
|
|
18
|
+
<SectionHeading
|
|
19
|
+
testID="sectionHeading"
|
|
20
|
+
text="test demo"
|
|
21
|
+
icon="document"
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
expect(wrapper.toJSON()).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('render right children correctly', () => {
|
|
29
|
+
const wrapper = renderWithTheme(
|
|
30
|
+
<SectionHeading
|
|
31
|
+
testID="sectionHeading"
|
|
32
|
+
text="test demo"
|
|
33
|
+
rightChildren={<Text>right children</Text>}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
expect(wrapper.toJSON()).toMatchSnapshot();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
import { StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
4
|
+
import Icon, { IconName } from '../Icon';
|
|
5
|
+
import Typography from '../Typography';
|
|
6
|
+
import {
|
|
7
|
+
StyledHeading,
|
|
8
|
+
StyledIconWrapper,
|
|
9
|
+
StyledWrapper,
|
|
10
|
+
} from './StyledHeading';
|
|
11
|
+
|
|
12
|
+
export interface SectionHeadingProps extends ViewProps {
|
|
13
|
+
/**
|
|
14
|
+
* Heading text.
|
|
15
|
+
*/
|
|
16
|
+
text: string | ReactElement;
|
|
17
|
+
/**
|
|
18
|
+
* Name of the Icon.
|
|
19
|
+
*/
|
|
20
|
+
icon?: IconName;
|
|
21
|
+
/**
|
|
22
|
+
* Right corner content
|
|
23
|
+
*/
|
|
24
|
+
rightChildren?: ReactElement;
|
|
25
|
+
/**
|
|
26
|
+
* Size of the text.
|
|
27
|
+
*/
|
|
28
|
+
fontSize?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
29
|
+
/**
|
|
30
|
+
* Heading's font-weight.
|
|
31
|
+
*/
|
|
32
|
+
fontWeight?: 'light' | 'regular' | 'semi-bold';
|
|
33
|
+
/**
|
|
34
|
+
* Visual intent color to apply to text.
|
|
35
|
+
*/
|
|
36
|
+
intent?: 'subdued' | 'body' | 'primary';
|
|
37
|
+
/**
|
|
38
|
+
* Addditional style.
|
|
39
|
+
*/
|
|
40
|
+
style?: StyleProp<ViewStyle>;
|
|
41
|
+
/**
|
|
42
|
+
* Testing id of the component.
|
|
43
|
+
*/
|
|
44
|
+
testID?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const ICON_SIZE_MAP = {
|
|
48
|
+
small: 'small',
|
|
49
|
+
medium: 'medium',
|
|
50
|
+
large: 'medium',
|
|
51
|
+
xlarge: 'large',
|
|
52
|
+
} as const;
|
|
53
|
+
|
|
54
|
+
const ICON_INTENT_MAP = {
|
|
55
|
+
body: 'text',
|
|
56
|
+
subdued: 'text',
|
|
57
|
+
primary: 'primary',
|
|
58
|
+
} as const;
|
|
59
|
+
|
|
60
|
+
const SectionHeading = ({
|
|
61
|
+
icon,
|
|
62
|
+
text,
|
|
63
|
+
rightChildren,
|
|
64
|
+
fontSize = 'large',
|
|
65
|
+
intent = 'body',
|
|
66
|
+
fontWeight = 'regular',
|
|
67
|
+
style,
|
|
68
|
+
testID,
|
|
69
|
+
}: SectionHeadingProps): ReactElement => (
|
|
70
|
+
<StyledHeading style={style} testID={testID}>
|
|
71
|
+
<StyledWrapper>
|
|
72
|
+
<StyledIconWrapper>
|
|
73
|
+
{icon && (
|
|
74
|
+
<Icon
|
|
75
|
+
icon={icon}
|
|
76
|
+
size={ICON_SIZE_MAP[fontSize]}
|
|
77
|
+
intent={ICON_INTENT_MAP[intent]}
|
|
78
|
+
/>
|
|
79
|
+
)}
|
|
80
|
+
</StyledIconWrapper>
|
|
81
|
+
<Typography.Text
|
|
82
|
+
fontSize={fontSize}
|
|
83
|
+
intent={intent}
|
|
84
|
+
fontWeight={fontWeight}
|
|
85
|
+
>
|
|
86
|
+
{text}
|
|
87
|
+
</Typography.Text>
|
|
88
|
+
</StyledWrapper>
|
|
89
|
+
{rightChildren}
|
|
90
|
+
</StyledHeading>
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
export default SectionHeading;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { Animated, Easing, StyleSheet } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { StyledSpinnerDot, StyledSpinnerRow } from './StyledSpinner';
|
|
5
|
+
|
|
6
|
+
const AnimatedRow = Animated.createAnimatedComponent(StyledSpinnerRow);
|
|
7
|
+
|
|
8
|
+
const AnimatedDot = Animated.createAnimatedComponent(StyledSpinnerDot);
|
|
9
|
+
|
|
10
|
+
const AnimatedSpinner = () => {
|
|
11
|
+
const rotateAnimation = useRef<Animated.Value>(new Animated.Value(0));
|
|
12
|
+
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const animation = Animated.loop(
|
|
15
|
+
Animated.timing(rotateAnimation.current, {
|
|
16
|
+
toValue: 1,
|
|
17
|
+
duration: 1200,
|
|
18
|
+
easing: Easing.linear,
|
|
19
|
+
useNativeDriver: true,
|
|
20
|
+
})
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
animation.start();
|
|
24
|
+
|
|
25
|
+
return () => {
|
|
26
|
+
animation.stop();
|
|
27
|
+
};
|
|
28
|
+
}, []);
|
|
29
|
+
|
|
30
|
+
const interpolatedRotateAnimation = rotateAnimation.current.interpolate({
|
|
31
|
+
inputRange: [0, 1],
|
|
32
|
+
outputRange: ['0deg', '360deg'],
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<Animated.View
|
|
37
|
+
style={StyleSheet.flatten([
|
|
38
|
+
{
|
|
39
|
+
transform: [{ rotate: interpolatedRotateAnimation }],
|
|
40
|
+
},
|
|
41
|
+
])}
|
|
42
|
+
>
|
|
43
|
+
<AnimatedRow themePosition="top">
|
|
44
|
+
<AnimatedDot themePosition="topLeft" />
|
|
45
|
+
<AnimatedDot themePosition="topRight" />
|
|
46
|
+
</AnimatedRow>
|
|
47
|
+
<AnimatedRow themePosition="bottom">
|
|
48
|
+
<AnimatedDot themePosition="bottomLeft" />
|
|
49
|
+
<AnimatedDot themePosition="bottomRight" />
|
|
50
|
+
</AnimatedRow>
|
|
51
|
+
</Animated.View>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export { AnimatedSpinner };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { View, ViewProps } from 'react-native';
|
|
2
|
+
import styled from '@emotion/native';
|
|
3
|
+
import { scale } from '../../utils/scale';
|
|
4
|
+
|
|
5
|
+
const StyledView = styled(View)<ViewProps>();
|
|
6
|
+
|
|
7
|
+
const StyledSpinnerContainer = styled(View)<ViewProps>({
|
|
8
|
+
height: '100%',
|
|
9
|
+
justifyContent: 'center',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const StyledSpinnerRow = styled(View)<{ themePosition: 'top' | 'bottom' }>(
|
|
14
|
+
({ themePosition, theme }) => ({
|
|
15
|
+
flexDirection: 'row',
|
|
16
|
+
marginBottom:
|
|
17
|
+
themePosition === 'top'
|
|
18
|
+
? theme.__hd__.spinner.space.spinnerDotPadding
|
|
19
|
+
: 0,
|
|
20
|
+
})
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
const StyledSpinnerDot = styled(View)<{
|
|
24
|
+
themePosition: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
25
|
+
}>(({ themePosition, theme }) => {
|
|
26
|
+
const themeStyling = () => {
|
|
27
|
+
switch (themePosition) {
|
|
28
|
+
case 'topLeft':
|
|
29
|
+
return { opacity: 1 };
|
|
30
|
+
case 'topRight':
|
|
31
|
+
return {
|
|
32
|
+
marginLeft: theme.__hd__.spinner.space.spinnerDotPadding,
|
|
33
|
+
opacity: 0.7,
|
|
34
|
+
};
|
|
35
|
+
case 'bottomLeft':
|
|
36
|
+
return { opacity: 0.5 };
|
|
37
|
+
case 'bottomRight':
|
|
38
|
+
return {
|
|
39
|
+
marginLeft: theme.__hd__.spinner.space.spinnerDotPadding,
|
|
40
|
+
opacity: 0.3,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
height: scale(theme.__hd__.spinner.space.spinnerDot),
|
|
47
|
+
width: scale(theme.__hd__.spinner.space.spinnerDot),
|
|
48
|
+
borderRadius: theme.__hd__.spinner.radii.default,
|
|
49
|
+
backgroundColor: theme.__hd__.spinner.color.default,
|
|
50
|
+
...themeStyling(),
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
StyledView,
|
|
56
|
+
StyledSpinnerContainer,
|
|
57
|
+
StyledSpinnerRow,
|
|
58
|
+
StyledSpinnerDot,
|
|
59
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
3
|
+
import { AnimatedSpinner } from '../AnimatedSpinner';
|
|
4
|
+
|
|
5
|
+
describe('AnimatedSpinner', () => {
|
|
6
|
+
it('renders correctly', () => {
|
|
7
|
+
const { toJSON } = renderWithTheme(<AnimatedSpinner />);
|
|
8
|
+
|
|
9
|
+
expect(toJSON()).toMatchSnapshot();
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
3
|
+
import { AnimatedSpinner } from '../AnimatedSpinner';
|
|
4
|
+
import {
|
|
5
|
+
StyledSpinnerContainer,
|
|
6
|
+
StyledSpinnerDot,
|
|
7
|
+
StyledSpinnerRow,
|
|
8
|
+
} from '../StyledSpinner';
|
|
9
|
+
|
|
10
|
+
describe('StyledSpinnerContainer', () => {
|
|
11
|
+
it('renders correctly', () => {
|
|
12
|
+
const { toJSON } = renderWithTheme(
|
|
13
|
+
<StyledSpinnerContainer>
|
|
14
|
+
<AnimatedSpinner />
|
|
15
|
+
</StyledSpinnerContainer>
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
expect(toJSON()).toMatchSnapshot();
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
describe('StyledSpinnerRow', () => {
|
|
23
|
+
it.each`
|
|
24
|
+
themePosition
|
|
25
|
+
${'top'}
|
|
26
|
+
${'bottom'}
|
|
27
|
+
`(
|
|
28
|
+
'renders correctly when position is $themePosition',
|
|
29
|
+
({ themePosition }) => {
|
|
30
|
+
const { toJSON } = renderWithTheme(
|
|
31
|
+
<StyledSpinnerRow themePosition={themePosition} />
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
expect(toJSON()).toMatchSnapshot();
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
describe('StyledSpinnerText', () => {
|
|
40
|
+
it.each`
|
|
41
|
+
themePosition
|
|
42
|
+
${'topLeft'}
|
|
43
|
+
${'topRight'}
|
|
44
|
+
${'bottomLeft'}
|
|
45
|
+
${'bottomRight'}
|
|
46
|
+
`(
|
|
47
|
+
'renders correctly when position is $themePosition',
|
|
48
|
+
({ themePosition }) => {
|
|
49
|
+
const { toJSON } = renderWithTheme(
|
|
50
|
+
<StyledSpinnerDot themePosition={themePosition} />
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
expect(toJSON()).toMatchSnapshot();
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
});
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`AnimatedSpinner renders correctly 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
collapsable={false}
|
|
6
|
+
nativeID="animatedComponent"
|
|
7
|
+
style={
|
|
8
|
+
Object {
|
|
9
|
+
"transform": Array [
|
|
10
|
+
Object {
|
|
11
|
+
"rotate": "0deg",
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
>
|
|
17
|
+
<View
|
|
18
|
+
collapsable={false}
|
|
19
|
+
nativeID="animatedComponent"
|
|
20
|
+
style={
|
|
21
|
+
Array [
|
|
22
|
+
Object {
|
|
23
|
+
"flexDirection": "row",
|
|
24
|
+
"marginBottom": 8,
|
|
25
|
+
},
|
|
26
|
+
Object {},
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
themePosition="top"
|
|
30
|
+
>
|
|
31
|
+
<View
|
|
32
|
+
collapsable={false}
|
|
33
|
+
nativeID="animatedComponent"
|
|
34
|
+
style={
|
|
35
|
+
Array [
|
|
36
|
+
Object {
|
|
37
|
+
"backgroundColor": "#7622d7",
|
|
38
|
+
"borderRadius": 8,
|
|
39
|
+
"height": 16,
|
|
40
|
+
"opacity": 1,
|
|
41
|
+
"width": 16,
|
|
42
|
+
},
|
|
43
|
+
Object {},
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
themePosition="topLeft"
|
|
47
|
+
/>
|
|
48
|
+
<View
|
|
49
|
+
collapsable={false}
|
|
50
|
+
nativeID="animatedComponent"
|
|
51
|
+
style={
|
|
52
|
+
Array [
|
|
53
|
+
Object {
|
|
54
|
+
"backgroundColor": "#7622d7",
|
|
55
|
+
"borderRadius": 8,
|
|
56
|
+
"height": 16,
|
|
57
|
+
"marginLeft": 8,
|
|
58
|
+
"opacity": 0.7,
|
|
59
|
+
"width": 16,
|
|
60
|
+
},
|
|
61
|
+
Object {},
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
themePosition="topRight"
|
|
65
|
+
/>
|
|
66
|
+
</View>
|
|
67
|
+
<View
|
|
68
|
+
collapsable={false}
|
|
69
|
+
nativeID="animatedComponent"
|
|
70
|
+
style={
|
|
71
|
+
Array [
|
|
72
|
+
Object {
|
|
73
|
+
"flexDirection": "row",
|
|
74
|
+
"marginBottom": 0,
|
|
75
|
+
},
|
|
76
|
+
Object {},
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
themePosition="bottom"
|
|
80
|
+
>
|
|
81
|
+
<View
|
|
82
|
+
collapsable={false}
|
|
83
|
+
nativeID="animatedComponent"
|
|
84
|
+
style={
|
|
85
|
+
Array [
|
|
86
|
+
Object {
|
|
87
|
+
"backgroundColor": "#7622d7",
|
|
88
|
+
"borderRadius": 8,
|
|
89
|
+
"height": 16,
|
|
90
|
+
"opacity": 0.5,
|
|
91
|
+
"width": 16,
|
|
92
|
+
},
|
|
93
|
+
Object {},
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
themePosition="bottomLeft"
|
|
97
|
+
/>
|
|
98
|
+
<View
|
|
99
|
+
collapsable={false}
|
|
100
|
+
nativeID="animatedComponent"
|
|
101
|
+
style={
|
|
102
|
+
Array [
|
|
103
|
+
Object {
|
|
104
|
+
"backgroundColor": "#7622d7",
|
|
105
|
+
"borderRadius": 8,
|
|
106
|
+
"height": 16,
|
|
107
|
+
"marginLeft": 8,
|
|
108
|
+
"opacity": 0.3,
|
|
109
|
+
"width": 16,
|
|
110
|
+
},
|
|
111
|
+
Object {},
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
themePosition="bottomRight"
|
|
115
|
+
/>
|
|
116
|
+
</View>
|
|
117
|
+
</View>
|
|
118
|
+
`;
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`StyledSpinnerContainer renders correctly 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
style={
|
|
6
|
+
Array [
|
|
7
|
+
Object {
|
|
8
|
+
"alignItems": "center",
|
|
9
|
+
"height": "100%",
|
|
10
|
+
"justifyContent": "center",
|
|
11
|
+
},
|
|
12
|
+
undefined,
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
>
|
|
16
|
+
<View
|
|
17
|
+
collapsable={false}
|
|
18
|
+
nativeID="animatedComponent"
|
|
19
|
+
style={
|
|
20
|
+
Object {
|
|
21
|
+
"transform": Array [
|
|
22
|
+
Object {
|
|
23
|
+
"rotate": "0deg",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
>
|
|
29
|
+
<View
|
|
30
|
+
collapsable={false}
|
|
31
|
+
nativeID="animatedComponent"
|
|
32
|
+
style={
|
|
33
|
+
Array [
|
|
34
|
+
Object {
|
|
35
|
+
"flexDirection": "row",
|
|
36
|
+
"marginBottom": 8,
|
|
37
|
+
},
|
|
38
|
+
Object {},
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
themePosition="top"
|
|
42
|
+
>
|
|
43
|
+
<View
|
|
44
|
+
collapsable={false}
|
|
45
|
+
nativeID="animatedComponent"
|
|
46
|
+
style={
|
|
47
|
+
Array [
|
|
48
|
+
Object {
|
|
49
|
+
"backgroundColor": "#7622d7",
|
|
50
|
+
"borderRadius": 8,
|
|
51
|
+
"height": 16,
|
|
52
|
+
"opacity": 1,
|
|
53
|
+
"width": 16,
|
|
54
|
+
},
|
|
55
|
+
Object {},
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
themePosition="topLeft"
|
|
59
|
+
/>
|
|
60
|
+
<View
|
|
61
|
+
collapsable={false}
|
|
62
|
+
nativeID="animatedComponent"
|
|
63
|
+
style={
|
|
64
|
+
Array [
|
|
65
|
+
Object {
|
|
66
|
+
"backgroundColor": "#7622d7",
|
|
67
|
+
"borderRadius": 8,
|
|
68
|
+
"height": 16,
|
|
69
|
+
"marginLeft": 8,
|
|
70
|
+
"opacity": 0.7,
|
|
71
|
+
"width": 16,
|
|
72
|
+
},
|
|
73
|
+
Object {},
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
themePosition="topRight"
|
|
77
|
+
/>
|
|
78
|
+
</View>
|
|
79
|
+
<View
|
|
80
|
+
collapsable={false}
|
|
81
|
+
nativeID="animatedComponent"
|
|
82
|
+
style={
|
|
83
|
+
Array [
|
|
84
|
+
Object {
|
|
85
|
+
"flexDirection": "row",
|
|
86
|
+
"marginBottom": 0,
|
|
87
|
+
},
|
|
88
|
+
Object {},
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
themePosition="bottom"
|
|
92
|
+
>
|
|
93
|
+
<View
|
|
94
|
+
collapsable={false}
|
|
95
|
+
nativeID="animatedComponent"
|
|
96
|
+
style={
|
|
97
|
+
Array [
|
|
98
|
+
Object {
|
|
99
|
+
"backgroundColor": "#7622d7",
|
|
100
|
+
"borderRadius": 8,
|
|
101
|
+
"height": 16,
|
|
102
|
+
"opacity": 0.5,
|
|
103
|
+
"width": 16,
|
|
104
|
+
},
|
|
105
|
+
Object {},
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
themePosition="bottomLeft"
|
|
109
|
+
/>
|
|
110
|
+
<View
|
|
111
|
+
collapsable={false}
|
|
112
|
+
nativeID="animatedComponent"
|
|
113
|
+
style={
|
|
114
|
+
Array [
|
|
115
|
+
Object {
|
|
116
|
+
"backgroundColor": "#7622d7",
|
|
117
|
+
"borderRadius": 8,
|
|
118
|
+
"height": 16,
|
|
119
|
+
"marginLeft": 8,
|
|
120
|
+
"opacity": 0.3,
|
|
121
|
+
"width": 16,
|
|
122
|
+
},
|
|
123
|
+
Object {},
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
themePosition="bottomRight"
|
|
127
|
+
/>
|
|
128
|
+
</View>
|
|
129
|
+
</View>
|
|
130
|
+
</View>
|
|
131
|
+
`;
|
|
132
|
+
|
|
133
|
+
exports[`StyledSpinnerRow renders correctly when position is bottom 1`] = `
|
|
134
|
+
<View
|
|
135
|
+
style={
|
|
136
|
+
Array [
|
|
137
|
+
Object {
|
|
138
|
+
"flexDirection": "row",
|
|
139
|
+
"marginBottom": 0,
|
|
140
|
+
},
|
|
141
|
+
undefined,
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
themePosition="bottom"
|
|
145
|
+
/>
|
|
146
|
+
`;
|
|
147
|
+
|
|
148
|
+
exports[`StyledSpinnerRow renders correctly when position is top 1`] = `
|
|
149
|
+
<View
|
|
150
|
+
style={
|
|
151
|
+
Array [
|
|
152
|
+
Object {
|
|
153
|
+
"flexDirection": "row",
|
|
154
|
+
"marginBottom": 8,
|
|
155
|
+
},
|
|
156
|
+
undefined,
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
themePosition="top"
|
|
160
|
+
/>
|
|
161
|
+
`;
|
|
162
|
+
|
|
163
|
+
exports[`StyledSpinnerText renders correctly when position is bottomLeft 1`] = `
|
|
164
|
+
<View
|
|
165
|
+
style={
|
|
166
|
+
Array [
|
|
167
|
+
Object {
|
|
168
|
+
"backgroundColor": "#7622d7",
|
|
169
|
+
"borderRadius": 8,
|
|
170
|
+
"height": 16,
|
|
171
|
+
"opacity": 0.5,
|
|
172
|
+
"width": 16,
|
|
173
|
+
},
|
|
174
|
+
undefined,
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
themePosition="bottomLeft"
|
|
178
|
+
/>
|
|
179
|
+
`;
|
|
180
|
+
|
|
181
|
+
exports[`StyledSpinnerText renders correctly when position is bottomRight 1`] = `
|
|
182
|
+
<View
|
|
183
|
+
style={
|
|
184
|
+
Array [
|
|
185
|
+
Object {
|
|
186
|
+
"backgroundColor": "#7622d7",
|
|
187
|
+
"borderRadius": 8,
|
|
188
|
+
"height": 16,
|
|
189
|
+
"marginLeft": 8,
|
|
190
|
+
"opacity": 0.3,
|
|
191
|
+
"width": 16,
|
|
192
|
+
},
|
|
193
|
+
undefined,
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
themePosition="bottomRight"
|
|
197
|
+
/>
|
|
198
|
+
`;
|
|
199
|
+
|
|
200
|
+
exports[`StyledSpinnerText renders correctly when position is topLeft 1`] = `
|
|
201
|
+
<View
|
|
202
|
+
style={
|
|
203
|
+
Array [
|
|
204
|
+
Object {
|
|
205
|
+
"backgroundColor": "#7622d7",
|
|
206
|
+
"borderRadius": 8,
|
|
207
|
+
"height": 16,
|
|
208
|
+
"opacity": 1,
|
|
209
|
+
"width": 16,
|
|
210
|
+
},
|
|
211
|
+
undefined,
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
themePosition="topLeft"
|
|
215
|
+
/>
|
|
216
|
+
`;
|
|
217
|
+
|
|
218
|
+
exports[`StyledSpinnerText renders correctly when position is topRight 1`] = `
|
|
219
|
+
<View
|
|
220
|
+
style={
|
|
221
|
+
Array [
|
|
222
|
+
Object {
|
|
223
|
+
"backgroundColor": "#7622d7",
|
|
224
|
+
"borderRadius": 8,
|
|
225
|
+
"height": 16,
|
|
226
|
+
"marginLeft": 8,
|
|
227
|
+
"opacity": 0.7,
|
|
228
|
+
"width": 16,
|
|
229
|
+
},
|
|
230
|
+
undefined,
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
themePosition="topRight"
|
|
234
|
+
/>
|
|
235
|
+
`;
|