@xhsreds/reds-rn-next 0.1.2 → 0.1.4
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/benchmarks/out.json +900 -820
- package/coverage/.tmp/coverage-0.json +1 -1
- package/coverage/.tmp/coverage-1.json +1 -1
- package/coverage/.tmp/coverage-10.json +1 -1
- package/coverage/.tmp/coverage-12.json +1 -1
- package/coverage/.tmp/coverage-13.json +1 -1
- package/coverage/.tmp/coverage-14.json +1 -1
- package/coverage/.tmp/coverage-15.json +1 -1
- package/coverage/.tmp/coverage-16.json +1 -1
- package/coverage/.tmp/coverage-17.json +1 -1
- package/coverage/.tmp/coverage-18.json +1 -1
- package/coverage/.tmp/coverage-19.json +1 -1
- package/coverage/.tmp/coverage-2.json +1 -1
- package/coverage/.tmp/coverage-20.json +1 -1
- package/coverage/.tmp/coverage-21.json +1 -1
- package/coverage/.tmp/coverage-22.json +1 -1
- package/coverage/.tmp/coverage-23.json +1 -1
- package/coverage/.tmp/coverage-24.json +1 -1
- package/coverage/.tmp/coverage-25.json +1 -1
- package/coverage/.tmp/coverage-26.json +1 -1
- package/coverage/.tmp/coverage-27.json +1 -1
- package/coverage/.tmp/coverage-28.json +1 -1
- package/coverage/.tmp/coverage-29.json +1 -0
- package/coverage/.tmp/coverage-3.json +1 -1
- package/coverage/.tmp/coverage-30.json +1 -0
- package/coverage/.tmp/coverage-31.json +1 -0
- package/coverage/.tmp/coverage-32.json +1 -0
- package/coverage/.tmp/coverage-4.json +1 -1
- package/coverage/.tmp/coverage-5.json +1 -1
- package/coverage/.tmp/coverage-6.json +1 -1
- package/coverage/.tmp/coverage-7.json +1 -1
- package/coverage/.tmp/coverage-8.json +1 -1
- package/coverage/.tmp/coverage-9.json +1 -1
- package/lib/cjs/_chunks/CkkZzOy_.js +23 -0
- package/lib/cjs/_chunks/CkkZzOy_.js.map +1 -0
- package/lib/cjs/_chunks/GhFTd1qc.js +22 -0
- package/lib/cjs/_chunks/GhFTd1qc.js.map +1 -0
- package/lib/cjs/_chunks/RPaDcSae.js +20 -0
- package/lib/cjs/_chunks/RPaDcSae.js.map +1 -0
- package/lib/cjs/_chunks/bwo-gq0b.js +66 -0
- package/lib/cjs/_chunks/bwo-gq0b.js.map +1 -0
- package/lib/cjs/components/ActionSheets/ActionSheets.js +99 -0
- package/lib/cjs/components/ActionSheets/ActionSheets.js.map +1 -0
- package/lib/cjs/components/ActionSheets/index.js +37 -0
- package/lib/cjs/components/ActionSheets/index.js.map +1 -0
- package/lib/cjs/components/ActionSheets/interface/index.js +9 -0
- package/lib/cjs/components/ActionSheets/interface/index.js.map +1 -0
- package/lib/cjs/components/ActionSheets/styles.js +59 -0
- package/lib/cjs/components/ActionSheets/styles.js.map +1 -0
- package/lib/cjs/components/Alert/Alert.js +143 -0
- package/lib/cjs/components/Alert/Alert.js.map +1 -0
- package/lib/cjs/components/Alert/index.js +145 -0
- package/lib/cjs/components/Alert/index.js.map +1 -0
- package/lib/cjs/components/Alert/interface/index.js +8 -0
- package/lib/cjs/components/Alert/interface/index.js.map +1 -0
- package/lib/cjs/components/Alert/styles.js +124 -0
- package/lib/cjs/components/Alert/styles.js.map +1 -0
- package/lib/cjs/components/Avatar/Avatar.js +1 -1
- package/lib/cjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/cjs/components/AvatarGroup/AvatarGroup.js +97 -98
- package/lib/cjs/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/lib/cjs/components/AvatarGroup/index.js +61 -21
- package/lib/cjs/components/AvatarGroup/index.js.map +1 -1
- package/lib/cjs/components/Button/Button.js +1 -1
- package/lib/cjs/components/Button/Button.js.map +1 -1
- package/lib/cjs/components/FAB/FAB.js +1 -1
- package/lib/cjs/components/FAB/FAB.js.map +1 -1
- package/lib/cjs/components/Image/hook/index.js +2 -2
- package/lib/cjs/components/Image/hook/index.js.map +1 -1
- package/lib/cjs/components/ImagePreview/ImagePreview.js +96 -68
- package/lib/cjs/components/ImagePreview/ImagePreview.js.map +1 -1
- package/lib/cjs/components/ImagePreview/ImageViewer3.js +3 -3
- package/lib/cjs/components/ImagePreview/ImageViewer3.js.map +1 -1
- package/lib/cjs/components/ImagePreview/index.js +65 -20
- package/lib/cjs/components/ImagePreview/index.js.map +1 -1
- package/lib/cjs/components/List/ListItem/ListItem.js +94 -113
- package/lib/cjs/components/List/ListItem/ListItem.js.map +1 -1
- package/lib/cjs/components/List/index.js +59 -18
- package/lib/cjs/components/List/index.js.map +1 -1
- package/lib/cjs/components/Picker/Picker.js +6 -1
- package/lib/cjs/components/Picker/Picker.js.map +1 -1
- package/lib/cjs/components/Picker/index.js +6 -1
- package/lib/cjs/components/Picker/index.js.map +1 -1
- package/lib/cjs/components/Sheets/Sheets.js +168 -16
- package/lib/cjs/components/Sheets/Sheets.js.map +1 -1
- package/lib/cjs/components/Sheets/index.js +9 -3
- package/lib/cjs/components/Sheets/index.js.map +1 -1
- package/lib/cjs/components/Sheets/interface/index.js +6 -1
- package/lib/cjs/components/Sheets/interface/index.js.map +1 -1
- package/lib/cjs/components/Sheets/styles.js +39 -11
- package/lib/cjs/components/Sheets/styles.js.map +1 -1
- package/lib/cjs/components/Silder/Silder.js +71 -0
- package/lib/cjs/components/Silder/Silder.js.map +1 -0
- package/lib/cjs/components/Silder/index.js +18 -0
- package/lib/cjs/components/Silder/index.js.map +1 -0
- package/lib/cjs/components/Silder/interface/index.js +9 -0
- package/lib/cjs/components/Silder/interface/index.js.map +1 -0
- package/lib/cjs/components/Silder/styles.js +29 -0
- package/lib/cjs/components/Silder/styles.js.map +1 -0
- package/lib/cjs/components/TabBar/TabBar.js +10 -10
- package/lib/cjs/components/TabBar/TabBar.js.map +1 -1
- package/lib/cjs/components/Tag/Tag.js +1 -1
- package/lib/cjs/components/Tag/Tag.js.map +1 -1
- package/lib/cjs/components/Text/hooks/loadFontFromFile.js +1 -1
- package/lib/cjs/components/Text/hooks/loadFontFromFile.js.map +1 -1
- package/lib/cjs/index.js +254 -30
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/_chunks/BJ2Kj1Vd.js +58 -0
- package/lib/esm/_chunks/BJ2Kj1Vd.js.map +1 -0
- package/lib/esm/_chunks/BKEXyO9m.js +19 -0
- package/lib/esm/_chunks/BKEXyO9m.js.map +1 -0
- package/lib/esm/_chunks/{D-HreRcG.js → CwHnr-H1.js} +2 -2
- package/lib/esm/_chunks/{D-HreRcG.js.map → CwHnr-H1.js.map} +1 -1
- package/lib/esm/_chunks/DHJk9lIr.js +19 -0
- package/lib/esm/_chunks/DHJk9lIr.js.map +1 -0
- package/lib/esm/_chunks/RRfNwNcs.js +17 -0
- package/lib/esm/_chunks/RRfNwNcs.js.map +1 -0
- package/lib/esm/components/ActionSheets/ActionSheets.js +95 -0
- package/lib/esm/components/ActionSheets/ActionSheets.js.map +1 -0
- package/lib/esm/components/ActionSheets/index.js +31 -0
- package/lib/esm/components/ActionSheets/index.js.map +1 -0
- package/lib/esm/components/ActionSheets/interface/index.js +2 -0
- package/lib/esm/components/ActionSheets/interface/index.js.map +1 -0
- package/lib/esm/components/ActionSheets/styles.js +55 -0
- package/lib/esm/components/ActionSheets/styles.js.map +1 -0
- package/lib/esm/components/Alert/Alert.js +135 -0
- package/lib/esm/components/Alert/Alert.js.map +1 -0
- package/lib/esm/components/Alert/index.js +139 -0
- package/lib/esm/components/Alert/index.js.map +1 -0
- package/lib/esm/components/Alert/interface/index.js +2 -0
- package/lib/esm/components/Alert/interface/index.js.map +1 -0
- package/lib/esm/components/Alert/styles.js +122 -0
- package/lib/esm/components/Alert/styles.js.map +1 -0
- package/lib/esm/components/Avatar/Avatar.js +2 -2
- package/lib/esm/components/Avatar/Avatar.js.map +1 -1
- package/lib/esm/components/Avatar/index.js +1 -1
- package/lib/esm/components/Avatar/styles.js +1 -1
- package/lib/esm/components/AvatarGroup/AvatarGroup.js +95 -100
- package/lib/esm/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/lib/esm/components/AvatarGroup/index.js +59 -19
- package/lib/esm/components/AvatarGroup/index.js.map +1 -1
- package/lib/esm/components/Badge/Badge.js +1 -1
- package/lib/esm/components/Badge/index.js +1 -1
- package/lib/esm/components/BottomBar/BottomBar.js +1 -1
- package/lib/esm/components/BottomBar/index.js +1 -1
- package/lib/esm/components/Button/Button.js +2 -2
- package/lib/esm/components/Button/Button.js.map +1 -1
- package/lib/esm/components/Button/index.js +1 -1
- package/lib/esm/components/Button/styleMap.js +1 -1
- package/lib/esm/components/Collapse/Collapse.js +1 -1
- package/lib/esm/components/Collapse/Item/Item.js +1 -1
- package/lib/esm/components/Collapse/Item/styles.js +1 -1
- package/lib/esm/components/Collapse/index.js +1 -1
- package/lib/esm/components/ConfigProvider/ConfigProvider.js +1 -1
- package/lib/esm/components/ConfigProvider/hooks/ConfigCache/ConfigCache.js +1 -1
- package/lib/esm/components/ConfigProvider/hooks/ConfigCache/index.js +1 -1
- package/lib/esm/components/ConfigProvider/hooks/themeToken/useThemeToken.js +1 -1
- package/lib/esm/components/ConfigProvider/index.js +1 -1
- package/lib/esm/components/Divider/Divider.js +1 -1
- package/lib/esm/components/Divider/index.js +1 -1
- package/lib/esm/components/Divider/styles.js +1 -1
- package/lib/esm/components/DropDown/DropDown.js +1 -1
- package/lib/esm/components/DropDown/DropDownItem.js +1 -1
- package/lib/esm/components/DropDown/index.js +1 -1
- package/lib/esm/components/DropDown/styles.js +1 -1
- package/lib/esm/components/Empty/Empty.js +1 -1
- package/lib/esm/components/Empty/index.js +1 -1
- package/lib/esm/components/Empty/styles.js +1 -1
- package/lib/esm/components/FAB/FAB.js +2 -2
- package/lib/esm/components/FAB/FAB.js.map +1 -1
- package/lib/esm/components/FAB/index.js +1 -1
- package/lib/esm/components/Image/Image.js +1 -1
- package/lib/esm/components/Image/hook/index.js +3 -3
- package/lib/esm/components/Image/hook/index.js.map +1 -1
- package/lib/esm/components/Image/index.js +1 -1
- package/lib/esm/components/ImagePreview/Gesture/useGesture.js +1 -1
- package/lib/esm/components/ImagePreview/ImagePreview.js +95 -71
- package/lib/esm/components/ImagePreview/ImagePreview.js.map +1 -1
- package/lib/esm/components/ImagePreview/ImageViewer.js +1 -1
- package/lib/esm/components/ImagePreview/ImageViewer3.js +4 -4
- package/lib/esm/components/ImagePreview/ImageViewer3.js.map +1 -1
- package/lib/esm/components/ImagePreview/index.js +63 -18
- package/lib/esm/components/ImagePreview/index.js.map +1 -1
- package/lib/esm/components/List/ListItem/ListItem.js +92 -115
- package/lib/esm/components/List/ListItem/ListItem.js.map +1 -1
- package/lib/esm/components/List/index.js +59 -18
- package/lib/esm/components/List/index.js.map +1 -1
- package/lib/esm/components/Picker/Picker.js +7 -2
- package/lib/esm/components/Picker/Picker.js.map +1 -1
- package/lib/esm/components/Picker/index.js +7 -2
- package/lib/esm/components/Picker/index.js.map +1 -1
- package/lib/esm/components/PickerView/PickerView.js +1 -1
- package/lib/esm/components/PickerView/Wheel.js +1 -1
- package/lib/esm/components/PickerView/index.js +1 -1
- package/lib/esm/components/Popover/Popover.js +1 -1
- package/lib/esm/components/Popover/component.js +1 -1
- package/lib/esm/components/Popover/hook.js +1 -1
- package/lib/esm/components/Popover/index.js +1 -1
- package/lib/esm/components/Portal/core/PortalProvider.js +1 -1
- package/lib/esm/components/Portal/index.js +1 -1
- package/lib/esm/components/Progress/Progress.js +1 -1
- package/lib/esm/components/Progress/index.js +1 -1
- package/lib/esm/components/ProgressIndicator/ProgressIndicator.js +1 -1
- package/lib/esm/components/ProgressIndicator/index.js +1 -1
- package/lib/esm/components/ProgressIndicator/styles.js +1 -1
- package/lib/esm/components/PullRefresh/PullRefresh.js +1 -1
- package/lib/esm/components/PullRefresh/component.js +1 -1
- package/lib/esm/components/PullRefresh/index.js +1 -1
- package/lib/esm/components/Result/Result.js +1 -1
- package/lib/esm/components/Result/index.js +1 -1
- package/lib/esm/components/Result/styles.js +1 -1
- package/lib/esm/components/Sheets/Sheets.js +170 -18
- package/lib/esm/components/Sheets/Sheets.js.map +1 -1
- package/lib/esm/components/Sheets/index.js +9 -3
- package/lib/esm/components/Sheets/index.js.map +1 -1
- package/lib/esm/components/Sheets/interface/index.js +1 -1
- package/lib/esm/components/Sheets/styles.js +39 -11
- package/lib/esm/components/Sheets/styles.js.map +1 -1
- package/lib/esm/components/Silder/Silder.js +67 -0
- package/lib/esm/components/Silder/Silder.js.map +1 -0
- package/lib/esm/components/Silder/index.js +12 -0
- package/lib/esm/components/Silder/index.js.map +1 -0
- package/lib/esm/components/Silder/interface/index.js +3 -0
- package/lib/esm/components/Silder/interface/index.js.map +1 -0
- package/lib/esm/components/Silder/styles.js +25 -0
- package/lib/esm/components/Silder/styles.js.map +1 -0
- package/lib/esm/components/Skeleton/Item/SkeletonItem.js +1 -1
- package/lib/esm/components/Skeleton/Skeleton.js +1 -1
- package/lib/esm/components/Skeleton/index.js +1 -1
- package/lib/esm/components/Switch/Switch.js +1 -1
- package/lib/esm/components/Switch/index.js +1 -1
- package/lib/esm/components/Tab/Tab.js +1 -1
- package/lib/esm/components/Tab/index.js +1 -1
- package/lib/esm/components/Tab/styles.js +1 -1
- package/lib/esm/components/TabBar/TabBar.js +11 -11
- package/lib/esm/components/TabBar/TabBar.js.map +1 -1
- package/lib/esm/components/TabBar/index.js +1 -1
- package/lib/esm/components/Tag/Tag.js +2 -2
- package/lib/esm/components/Tag/Tag.js.map +1 -1
- package/lib/esm/components/Tag/index.js +1 -1
- package/lib/esm/components/Text/Text.js +1 -1
- package/lib/esm/components/Text/hooks/cloneContainer.js +1 -1
- package/lib/esm/components/Text/hooks/index.js +1 -1
- package/lib/esm/components/Text/hooks/loadFontFromFile.js +2 -2
- package/lib/esm/components/Text/hooks/loadFontFromFile.js.map +1 -1
- package/lib/esm/components/Text/index.js +1 -1
- package/lib/esm/components/Text/styles.js +1 -1
- package/lib/esm/components/Toast/Toast.js +1 -1
- package/lib/esm/components/Toast/api.js +1 -1
- package/lib/esm/components/Toast/index.js +1 -1
- package/lib/esm/components/Toast/styles.js +1 -1
- package/lib/esm/index.js +253 -28
- package/lib/esm/index.js.map +1 -1
- package/lib/types/components/ActionSheets/ActionSheets.d.ts +10 -0
- package/lib/types/components/ActionSheets/demo/index.d.ts +2 -0
- package/lib/types/components/ActionSheets/index.d.ts +4 -0
- package/lib/types/components/ActionSheets/interface/index.d.ts +23 -0
- package/lib/types/components/ActionSheets/styles.d.ts +51 -0
- package/lib/types/components/ActionSheets/test/index.bench.d.ts +1 -0
- package/lib/types/components/ActionSheets/test/index.test.d.ts +1 -0
- package/lib/types/components/ActionSheets/test/paper.bench.d.ts +1 -0
- package/lib/types/components/Alert/Alert.d.ts +4 -0
- package/lib/types/components/Alert/demo/index.d.ts +2 -0
- package/lib/types/components/Alert/index.d.ts +4 -0
- package/lib/types/components/Alert/interface/index.d.ts +35 -0
- package/lib/types/components/Alert/styles.d.ts +108 -0
- package/lib/types/components/Alert/test/index.bench.d.ts +1 -0
- package/lib/types/components/Alert/test/index.test.d.ts +1 -0
- package/lib/types/components/Alert/test/paper.bench.d.ts +1 -0
- package/lib/types/components/FAB/test/paper.bench.d.ts +1 -0
- package/lib/types/components/Sheets/Sheets.d.ts +17 -1
- package/lib/types/components/Sheets/interface/index.d.ts +45 -0
- package/lib/types/components/Sheets/styles.d.ts +38 -9
- package/lib/types/components/Sheets/test/index.test.d.ts +1 -1
- package/lib/types/components/Silder/Silder.d.ts +13 -0
- package/lib/types/components/Silder/demo/index.d.ts +2 -0
- package/lib/types/components/Silder/index.d.ts +4 -0
- package/lib/types/components/Silder/interface/index.d.ts +19 -0
- package/lib/types/components/Silder/styles.d.ts +20 -0
- package/lib/types/components/Silder/test/index.bench.d.ts +1 -0
- package/lib/types/components/Silder/test/index.test.d.ts +1 -0
- package/lib/types/index.d.ts +6 -0
- package/package.json +2 -3
- package/src/components/ActionSheets/ActionSheets.tsx +66 -0
- package/src/components/ActionSheets/demo/index.tsx +65 -0
- package/src/components/ActionSheets/doc/index.mdx +24 -0
- package/src/components/ActionSheets/index.ts +5 -0
- package/src/components/ActionSheets/interface/index.ts +27 -0
- package/src/components/ActionSheets/styles.ts +54 -0
- package/src/components/ActionSheets/test/index.bench.tsx +13 -0
- package/src/components/ActionSheets/test/index.test.tsx +81 -0
- package/src/components/ActionSheets/test/paper.bench.tsx +17 -0
- package/src/components/Alert/Alert.tsx +170 -0
- package/src/components/Alert/demo/index.tsx +234 -0
- package/src/components/Alert/doc/index.mdx +37 -0
- package/src/components/Alert/index.ts +5 -0
- package/src/components/Alert/interface/index.ts +35 -0
- package/src/components/Alert/styles.ts +116 -0
- package/src/components/Alert/test/__snapshots__/index.test.tsx.snap +519 -0
- package/src/components/Alert/test/index.bench.tsx +13 -0
- package/src/components/Alert/test/index.test.tsx +62 -0
- package/src/components/Alert/test/paper.bench.tsx +26 -0
- package/src/components/Avatar/test/__snapshots__/index.test.tsx.snap +32 -0
- package/src/components/Avatar/test/paper.bench.tsx +1 -1
- package/src/components/Button/test/__snapshots__/index.test.tsx.snap +0 -10
- package/src/components/Divider/test/__snapshots__/index.test.tsx.snap +420 -6
- package/src/components/Divider/test/index.test.tsx +43 -35
- package/src/components/FAB/test/__snapshots__/index.test.tsx.snap +0 -2
- package/src/components/FAB/test/paper.bench.tsx +12 -0
- package/src/components/Picker/test/index.test.tsx +17 -25
- package/src/components/Progress/test/__snapshots__/index.test.tsx.snap +332 -3
- package/src/components/Progress/test/index.test.tsx +29 -19
- package/src/components/PullRefresh/test/index.bench.tsx +1 -1
- package/src/components/Sheets/Sheets.tsx +293 -20
- package/src/components/Sheets/demo/index.tsx +191 -14
- package/src/components/Sheets/doc/index.mdx +16 -5
- package/src/components/Sheets/interface/index.ts +50 -0
- package/src/components/Sheets/styles.ts +38 -10
- package/src/components/Sheets/test/index.test.tsx +71 -48
- package/src/components/Sheets/test/paper.bench.tsx +1 -1
- package/src/components/Silder/Silder.tsx +49 -0
- package/src/components/Silder/demo/index.tsx +53 -0
- package/src/components/Silder/doc/index.mdx +26 -0
- package/src/components/Silder/index.ts +5 -0
- package/src/components/Silder/interface/index.ts +20 -0
- package/src/components/Silder/styles.ts +24 -0
- package/src/components/Silder/test/index.bench.tsx +13 -0
- package/src/components/Silder/test/index.test.tsx +18 -0
- package/src/components/TabBar/TabBar.tsx +17 -17
- package/src/components/Toast/test/paper.bench.tsx +9 -5
- package/src/index.ts +17 -0
- package/lib/cjs/_chunks/DIhBCUjt.js +0 -17
- package/lib/cjs/_chunks/DIhBCUjt.js.map +0 -1
- package/lib/esm/_chunks/B3_9dzWY.js +0 -14
- package/lib/esm/_chunks/B3_9dzWY.js.map +0 -1
|
@@ -46,7 +46,6 @@ exports[`Button Component > applies the correct styles for shape circle 1`] = `
|
|
|
46
46
|
"backgroundColor": "rgba(255, 255, 255, 1)",
|
|
47
47
|
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
48
48
|
},
|
|
49
|
-
{},
|
|
50
49
|
]
|
|
51
50
|
}
|
|
52
51
|
>
|
|
@@ -115,7 +114,6 @@ exports[`Button Component > applies the correct styles for shape circle left ico
|
|
|
115
114
|
"backgroundColor": "rgba(255, 255, 255, 1)",
|
|
116
115
|
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
117
116
|
},
|
|
118
|
-
{},
|
|
119
117
|
]
|
|
120
118
|
}
|
|
121
119
|
>
|
|
@@ -260,7 +258,6 @@ exports[`Button Component > applies the correct styles for shape circle right ic
|
|
|
260
258
|
"backgroundColor": "rgba(255, 255, 255, 1)",
|
|
261
259
|
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
262
260
|
},
|
|
263
|
-
{},
|
|
264
261
|
]
|
|
265
262
|
}
|
|
266
263
|
>
|
|
@@ -407,7 +404,6 @@ exports[`Button Component > applies the correct styles for shape ghost 1`] = `
|
|
|
407
404
|
"backgroundColor": "rgba(255, 255, 255, 0.08)",
|
|
408
405
|
"borderColor": "rgba(0, 0, 0, 0.62)",
|
|
409
406
|
},
|
|
410
|
-
{},
|
|
411
407
|
]
|
|
412
408
|
}
|
|
413
409
|
>
|
|
@@ -478,7 +474,6 @@ exports[`Button Component > applies the correct styles for shape outline 1`] = `
|
|
|
478
474
|
"backgroundColor": "transparent",
|
|
479
475
|
"borderColor": "rgba(0, 0, 0, 0.62)",
|
|
480
476
|
},
|
|
481
|
-
{},
|
|
482
477
|
]
|
|
483
478
|
}
|
|
484
479
|
>
|
|
@@ -549,7 +544,6 @@ exports[`Button Component > applies the correct styles for shape text 1`] = `
|
|
|
549
544
|
"backgroundColor": "transparent",
|
|
550
545
|
"borderColor": "transparent",
|
|
551
546
|
},
|
|
552
|
-
{},
|
|
553
547
|
]
|
|
554
548
|
}
|
|
555
549
|
>
|
|
@@ -620,7 +614,6 @@ exports[`Button Component > applies the correct styles for size 1`] = `
|
|
|
620
614
|
"backgroundColor": "rgba(255, 255, 255, 1)",
|
|
621
615
|
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
622
616
|
},
|
|
623
|
-
{},
|
|
624
617
|
]
|
|
625
618
|
}
|
|
626
619
|
>
|
|
@@ -691,7 +684,6 @@ exports[`Button Component > applies the correct styles for variant fill 1`] = `
|
|
|
691
684
|
"backgroundColor": "rgba(255, 36, 66, 1)",
|
|
692
685
|
"borderColor": "rgba(255, 36, 66, 1)",
|
|
693
686
|
},
|
|
694
|
-
{},
|
|
695
687
|
]
|
|
696
688
|
}
|
|
697
689
|
>
|
|
@@ -761,7 +753,6 @@ exports[`Button Component > applies the correct styles when block is true 1`] =
|
|
|
761
753
|
"backgroundColor": "rgba(255, 255, 255, 1)",
|
|
762
754
|
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
763
755
|
},
|
|
764
|
-
{},
|
|
765
756
|
{
|
|
766
757
|
"width": "100%",
|
|
767
758
|
},
|
|
@@ -834,7 +825,6 @@ exports[`Button Component > applies the correct styles when disabled is true 1`]
|
|
|
834
825
|
"backgroundColor": "rgba(255, 255, 255, 1)",
|
|
835
826
|
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
836
827
|
},
|
|
837
|
-
{},
|
|
838
828
|
{
|
|
839
829
|
"opacity": 0.3,
|
|
840
830
|
},
|
|
@@ -1,6 +1,101 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Divider Component > applies custom styles based on size prop 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
style={
|
|
6
|
+
[
|
|
7
|
+
{
|
|
8
|
+
"position": "relative",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"color": "rgba(0, 0, 0, 0.45)",
|
|
12
|
+
"fontSize": 12,
|
|
13
|
+
"fontWeight": "400",
|
|
14
|
+
},
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
>
|
|
18
|
+
<View
|
|
19
|
+
style={
|
|
20
|
+
{
|
|
21
|
+
"alignItems": "center",
|
|
22
|
+
"alignSelf": "center",
|
|
23
|
+
"backgroundColor": "#fff",
|
|
24
|
+
"flexDirection": "row",
|
|
25
|
+
"left": undefined,
|
|
26
|
+
"lineHeight": 18,
|
|
27
|
+
"paddingHorizontal": 16,
|
|
28
|
+
"paddingVertical": 0,
|
|
29
|
+
"position": "absolute",
|
|
30
|
+
"right": undefined,
|
|
31
|
+
"top": 0,
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
>
|
|
35
|
+
<View
|
|
36
|
+
style={
|
|
37
|
+
{
|
|
38
|
+
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
39
|
+
"borderStyle": "solid",
|
|
40
|
+
"borderTopWidth": 0.5,
|
|
41
|
+
"marginRight": 8,
|
|
42
|
+
"width": 12,
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/>
|
|
46
|
+
<Text
|
|
47
|
+
style={
|
|
48
|
+
{
|
|
49
|
+
"color": "rgba(0, 0, 0, 0.45)",
|
|
50
|
+
"fontSize": 12,
|
|
51
|
+
"fontWeight": "400",
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
>
|
|
55
|
+
Divider
|
|
56
|
+
</Text>
|
|
57
|
+
<View
|
|
58
|
+
style={
|
|
59
|
+
{
|
|
60
|
+
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
61
|
+
"borderStyle": "solid",
|
|
62
|
+
"borderTopWidth": 0.5,
|
|
63
|
+
"marginLeft": 8,
|
|
64
|
+
"width": 12,
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/>
|
|
68
|
+
</View>
|
|
69
|
+
</View>
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
exports[`Divider Component > applies the correct styles based on custom border number 1`] = `
|
|
73
|
+
<View
|
|
74
|
+
style={
|
|
75
|
+
[
|
|
76
|
+
{
|
|
77
|
+
"position": "relative",
|
|
78
|
+
},
|
|
79
|
+
undefined,
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
/>
|
|
83
|
+
`;
|
|
84
|
+
|
|
85
|
+
exports[`Divider Component > applies the correct styles based on custom margin 1`] = `
|
|
86
|
+
<View
|
|
87
|
+
style={
|
|
88
|
+
[
|
|
89
|
+
{
|
|
90
|
+
"position": "relative",
|
|
91
|
+
},
|
|
92
|
+
undefined,
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
/>
|
|
96
|
+
`;
|
|
97
|
+
|
|
98
|
+
exports[`Divider Component > applies the correct styles based on custom size 1`] = `
|
|
4
99
|
<View
|
|
5
100
|
style={
|
|
6
101
|
[
|
|
@@ -33,7 +128,37 @@ exports[`Divider Component > applies the correct styles for direction 1`] = `
|
|
|
33
128
|
},
|
|
34
129
|
]
|
|
35
130
|
}
|
|
36
|
-
|
|
131
|
+
>
|
|
132
|
+
<View
|
|
133
|
+
style={
|
|
134
|
+
{
|
|
135
|
+
"alignItems": "center",
|
|
136
|
+
"alignSelf": "center",
|
|
137
|
+
"backgroundColor": "#fff",
|
|
138
|
+
"flexDirection": "row",
|
|
139
|
+
"left": undefined,
|
|
140
|
+
"lineHeight": 18,
|
|
141
|
+
"paddingHorizontal": 16,
|
|
142
|
+
"paddingVertical": 0,
|
|
143
|
+
"position": "absolute",
|
|
144
|
+
"right": undefined,
|
|
145
|
+
"top": -9,
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
>
|
|
149
|
+
<Text
|
|
150
|
+
style={
|
|
151
|
+
{
|
|
152
|
+
"color": "rgba(0, 0, 0, 0.45)",
|
|
153
|
+
"fontSize": 12,
|
|
154
|
+
"fontWeight": "400",
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
>
|
|
158
|
+
Divider
|
|
159
|
+
</Text>
|
|
160
|
+
</View>
|
|
161
|
+
</View>
|
|
37
162
|
`;
|
|
38
163
|
|
|
39
164
|
exports[`Divider Component > applies the correct styles for direction 2`] = `
|
|
@@ -74,7 +199,59 @@ exports[`Divider Component > applies the correct styles for direction 3`] = `
|
|
|
74
199
|
},
|
|
75
200
|
]
|
|
76
201
|
}
|
|
77
|
-
|
|
202
|
+
>
|
|
203
|
+
<View
|
|
204
|
+
style={
|
|
205
|
+
{
|
|
206
|
+
"alignItems": "center",
|
|
207
|
+
"alignSelf": "center",
|
|
208
|
+
"backgroundColor": "#fff",
|
|
209
|
+
"flexDirection": "row",
|
|
210
|
+
"left": undefined,
|
|
211
|
+
"lineHeight": 18,
|
|
212
|
+
"paddingHorizontal": 16,
|
|
213
|
+
"paddingVertical": 0,
|
|
214
|
+
"position": "absolute",
|
|
215
|
+
"right": undefined,
|
|
216
|
+
"top": 0,
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
>
|
|
220
|
+
<View
|
|
221
|
+
style={
|
|
222
|
+
{
|
|
223
|
+
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
224
|
+
"borderStyle": "solid",
|
|
225
|
+
"borderTopWidth": 0.5,
|
|
226
|
+
"marginRight": 8,
|
|
227
|
+
"width": 12,
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/>
|
|
231
|
+
<Text
|
|
232
|
+
style={
|
|
233
|
+
{
|
|
234
|
+
"color": "rgba(0, 0, 0, 0.45)",
|
|
235
|
+
"fontSize": 12,
|
|
236
|
+
"fontWeight": "400",
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
>
|
|
240
|
+
Divider
|
|
241
|
+
</Text>
|
|
242
|
+
<View
|
|
243
|
+
style={
|
|
244
|
+
{
|
|
245
|
+
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
246
|
+
"borderStyle": "solid",
|
|
247
|
+
"borderTopWidth": 0.5,
|
|
248
|
+
"marginLeft": 8,
|
|
249
|
+
"width": 12,
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
/>
|
|
253
|
+
</View>
|
|
254
|
+
</View>
|
|
78
255
|
`;
|
|
79
256
|
|
|
80
257
|
exports[`Divider Component > applies the correct styles for direction 4`] = `
|
|
@@ -91,7 +268,59 @@ exports[`Divider Component > applies the correct styles for direction 4`] = `
|
|
|
91
268
|
},
|
|
92
269
|
]
|
|
93
270
|
}
|
|
94
|
-
|
|
271
|
+
>
|
|
272
|
+
<View
|
|
273
|
+
style={
|
|
274
|
+
{
|
|
275
|
+
"alignItems": "center",
|
|
276
|
+
"alignSelf": "center",
|
|
277
|
+
"backgroundColor": "#fff",
|
|
278
|
+
"flexDirection": "row",
|
|
279
|
+
"left": undefined,
|
|
280
|
+
"lineHeight": 18,
|
|
281
|
+
"paddingHorizontal": 16,
|
|
282
|
+
"paddingVertical": 0,
|
|
283
|
+
"position": "absolute",
|
|
284
|
+
"right": undefined,
|
|
285
|
+
"top": 0,
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
>
|
|
289
|
+
<View
|
|
290
|
+
style={
|
|
291
|
+
{
|
|
292
|
+
"borderColor": "rgba(51, 51, 51, .3)",
|
|
293
|
+
"borderStyle": "solid",
|
|
294
|
+
"borderTopWidth": 0.5,
|
|
295
|
+
"marginRight": 8,
|
|
296
|
+
"width": 12,
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
/>
|
|
300
|
+
<Text
|
|
301
|
+
style={
|
|
302
|
+
{
|
|
303
|
+
"color": "rgba(51, 51, 51, .3)",
|
|
304
|
+
"fontSize": 12,
|
|
305
|
+
"fontWeight": "400",
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
>
|
|
309
|
+
Divider
|
|
310
|
+
</Text>
|
|
311
|
+
<View
|
|
312
|
+
style={
|
|
313
|
+
{
|
|
314
|
+
"borderColor": "rgba(51, 51, 51, .3)",
|
|
315
|
+
"borderStyle": "solid",
|
|
316
|
+
"borderTopWidth": 0.5,
|
|
317
|
+
"marginLeft": 8,
|
|
318
|
+
"width": 12,
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
/>
|
|
322
|
+
</View>
|
|
323
|
+
</View>
|
|
95
324
|
`;
|
|
96
325
|
|
|
97
326
|
exports[`Divider Component > applies the correct styles for orientation 1`] = `
|
|
@@ -101,7 +330,11 @@ exports[`Divider Component > applies the correct styles for orientation 1`] = `
|
|
|
101
330
|
{
|
|
102
331
|
"position": "relative",
|
|
103
332
|
},
|
|
104
|
-
|
|
333
|
+
{
|
|
334
|
+
"color": "rgba(0, 0, 0, 0.45)",
|
|
335
|
+
"fontSize": 12,
|
|
336
|
+
"fontWeight": "400",
|
|
337
|
+
},
|
|
105
338
|
]
|
|
106
339
|
}
|
|
107
340
|
>
|
|
@@ -122,6 +355,17 @@ exports[`Divider Component > applies the correct styles for orientation 1`] = `
|
|
|
122
355
|
}
|
|
123
356
|
}
|
|
124
357
|
>
|
|
358
|
+
<View
|
|
359
|
+
style={
|
|
360
|
+
{
|
|
361
|
+
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
362
|
+
"borderStyle": "solid",
|
|
363
|
+
"borderTopWidth": 0.5,
|
|
364
|
+
"marginRight": 8,
|
|
365
|
+
"width": 12,
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
/>
|
|
125
369
|
<Text
|
|
126
370
|
style={
|
|
127
371
|
{
|
|
@@ -133,6 +377,17 @@ exports[`Divider Component > applies the correct styles for orientation 1`] = `
|
|
|
133
377
|
>
|
|
134
378
|
Divider
|
|
135
379
|
</Text>
|
|
380
|
+
<View
|
|
381
|
+
style={
|
|
382
|
+
{
|
|
383
|
+
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
384
|
+
"borderStyle": "solid",
|
|
385
|
+
"borderTopWidth": 0.5,
|
|
386
|
+
"marginLeft": 8,
|
|
387
|
+
"width": 12,
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
/>
|
|
136
391
|
</View>
|
|
137
392
|
</View>
|
|
138
393
|
`;
|
|
@@ -144,7 +399,11 @@ exports[`Divider Component > applies the correct styles for orientation 2`] = `
|
|
|
144
399
|
{
|
|
145
400
|
"position": "relative",
|
|
146
401
|
},
|
|
147
|
-
|
|
402
|
+
{
|
|
403
|
+
"color": "rgba(0, 0, 0, 0.45)",
|
|
404
|
+
"fontSize": 12,
|
|
405
|
+
"fontWeight": "400",
|
|
406
|
+
},
|
|
148
407
|
]
|
|
149
408
|
}
|
|
150
409
|
>
|
|
@@ -165,6 +424,17 @@ exports[`Divider Component > applies the correct styles for orientation 2`] = `
|
|
|
165
424
|
}
|
|
166
425
|
}
|
|
167
426
|
>
|
|
427
|
+
<View
|
|
428
|
+
style={
|
|
429
|
+
{
|
|
430
|
+
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
431
|
+
"borderStyle": "solid",
|
|
432
|
+
"borderTopWidth": 0.5,
|
|
433
|
+
"marginRight": 8,
|
|
434
|
+
"width": 12,
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
/>
|
|
168
438
|
<Text
|
|
169
439
|
style={
|
|
170
440
|
{
|
|
@@ -176,6 +446,17 @@ exports[`Divider Component > applies the correct styles for orientation 2`] = `
|
|
|
176
446
|
>
|
|
177
447
|
Divider
|
|
178
448
|
</Text>
|
|
449
|
+
<View
|
|
450
|
+
style={
|
|
451
|
+
{
|
|
452
|
+
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
453
|
+
"borderStyle": "solid",
|
|
454
|
+
"borderTopWidth": 0.5,
|
|
455
|
+
"marginLeft": 8,
|
|
456
|
+
"width": 12,
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
/>
|
|
179
460
|
</View>
|
|
180
461
|
</View>
|
|
181
462
|
`;
|
|
@@ -187,7 +468,11 @@ exports[`Divider Component > applies the correct styles for orientation 3`] = `
|
|
|
187
468
|
{
|
|
188
469
|
"position": "relative",
|
|
189
470
|
},
|
|
190
|
-
|
|
471
|
+
{
|
|
472
|
+
"color": "rgba(0, 0, 0, 0.45)",
|
|
473
|
+
"fontSize": 12,
|
|
474
|
+
"fontWeight": "400",
|
|
475
|
+
},
|
|
191
476
|
]
|
|
192
477
|
}
|
|
193
478
|
>
|
|
@@ -208,6 +493,17 @@ exports[`Divider Component > applies the correct styles for orientation 3`] = `
|
|
|
208
493
|
}
|
|
209
494
|
}
|
|
210
495
|
>
|
|
496
|
+
<View
|
|
497
|
+
style={
|
|
498
|
+
{
|
|
499
|
+
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
500
|
+
"borderStyle": "solid",
|
|
501
|
+
"borderTopWidth": 0.5,
|
|
502
|
+
"marginRight": 8,
|
|
503
|
+
"width": 12,
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
/>
|
|
211
507
|
<Text
|
|
212
508
|
style={
|
|
213
509
|
{
|
|
@@ -219,6 +515,124 @@ exports[`Divider Component > applies the correct styles for orientation 3`] = `
|
|
|
219
515
|
>
|
|
220
516
|
Divider
|
|
221
517
|
</Text>
|
|
518
|
+
<View
|
|
519
|
+
style={
|
|
520
|
+
{
|
|
521
|
+
"borderColor": "rgba(0, 0, 0, 0.2)",
|
|
522
|
+
"borderStyle": "solid",
|
|
523
|
+
"borderTopWidth": 0.5,
|
|
524
|
+
"marginLeft": 8,
|
|
525
|
+
"width": 12,
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
/>
|
|
222
529
|
</View>
|
|
223
530
|
</View>
|
|
224
531
|
`;
|
|
532
|
+
|
|
533
|
+
exports[`Divider Component > renders correctly with custom color 1`] = `
|
|
534
|
+
<View
|
|
535
|
+
style={
|
|
536
|
+
[
|
|
537
|
+
{
|
|
538
|
+
"position": "relative",
|
|
539
|
+
},
|
|
540
|
+
undefined,
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
/>
|
|
544
|
+
`;
|
|
545
|
+
|
|
546
|
+
exports[`Divider Component > renders correctly with default props 1`] = `
|
|
547
|
+
<View
|
|
548
|
+
style={
|
|
549
|
+
[
|
|
550
|
+
{
|
|
551
|
+
"position": "relative",
|
|
552
|
+
},
|
|
553
|
+
undefined,
|
|
554
|
+
]
|
|
555
|
+
}
|
|
556
|
+
/>
|
|
557
|
+
`;
|
|
558
|
+
|
|
559
|
+
exports[`Divider Component > renders correctly with horizontal direction 1`] = `
|
|
560
|
+
<View
|
|
561
|
+
style={
|
|
562
|
+
[
|
|
563
|
+
{
|
|
564
|
+
"position": "relative",
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"borderBottomColor": "rgba(0, 0, 0, 0.2)",
|
|
568
|
+
"borderBottomWidth": 0.5,
|
|
569
|
+
"borderLeftColor": undefined,
|
|
570
|
+
"borderLeftWidth": 0,
|
|
571
|
+
"borderStyle": "solid",
|
|
572
|
+
"marginHorizontal": 0,
|
|
573
|
+
"marginVertical": 20,
|
|
574
|
+
"position": "relative",
|
|
575
|
+
"width": undefined,
|
|
576
|
+
},
|
|
577
|
+
]
|
|
578
|
+
}
|
|
579
|
+
/>
|
|
580
|
+
`;
|
|
581
|
+
|
|
582
|
+
exports[`Divider Component > renders correctly with primary direction 1`] = `
|
|
583
|
+
<View
|
|
584
|
+
style={
|
|
585
|
+
[
|
|
586
|
+
{
|
|
587
|
+
"position": "relative",
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"color": "rgba(0, 0, 0, 0.45)",
|
|
591
|
+
"fontSize": 12,
|
|
592
|
+
"fontWeight": "400",
|
|
593
|
+
},
|
|
594
|
+
]
|
|
595
|
+
}
|
|
596
|
+
/>
|
|
597
|
+
`;
|
|
598
|
+
|
|
599
|
+
exports[`Divider Component > renders correctly with secondary direction 1`] = `
|
|
600
|
+
<View
|
|
601
|
+
style={
|
|
602
|
+
[
|
|
603
|
+
{
|
|
604
|
+
"position": "relative",
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"color": "rgba(51, 51, 51, .3)",
|
|
608
|
+
"fontSize": 12,
|
|
609
|
+
"fontWeight": "400",
|
|
610
|
+
},
|
|
611
|
+
]
|
|
612
|
+
}
|
|
613
|
+
/>
|
|
614
|
+
`;
|
|
615
|
+
|
|
616
|
+
exports[`Divider Component > renders correctly with vertical direction 1`] = `
|
|
617
|
+
<View
|
|
618
|
+
style={
|
|
619
|
+
[
|
|
620
|
+
{
|
|
621
|
+
"position": "relative",
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"borderBottomColor": undefined,
|
|
625
|
+
"borderBottomWidth": 0,
|
|
626
|
+
"borderLeftColor": "rgba(0, 0, 0, 0.2)",
|
|
627
|
+
"borderLeftWidth": 0.5,
|
|
628
|
+
"borderStyle": "solid",
|
|
629
|
+
"height": 18,
|
|
630
|
+
"marginHorizontal": 12,
|
|
631
|
+
"marginVertical": 0,
|
|
632
|
+
"position": "relative",
|
|
633
|
+
"width": "auto",
|
|
634
|
+
},
|
|
635
|
+
]
|
|
636
|
+
}
|
|
637
|
+
/>
|
|
638
|
+
`;
|
|
@@ -1,58 +1,66 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render } from "@testing-library/react-native";
|
|
3
3
|
import { describe, it, expect } from "vitest";
|
|
4
|
-
import Divider from "../
|
|
5
|
-
import { lightColor } from "@xhs/reds-token-next";
|
|
4
|
+
import Divider from "../Divider";
|
|
6
5
|
|
|
7
6
|
describe("Divider Component", () => {
|
|
8
7
|
it("renders correctly with default props", () => {
|
|
9
|
-
const {
|
|
10
|
-
expect(
|
|
8
|
+
const { toJSON } = render(<Divider />);
|
|
9
|
+
expect(toJSON()).toMatchSnapshot();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it("renders correctly with horizontal direction", () => {
|
|
13
|
+
const { toJSON } = render(<Divider direction="horizontal" />);
|
|
14
|
+
expect(toJSON()).toMatchSnapshot();
|
|
11
15
|
});
|
|
12
16
|
|
|
13
|
-
it("
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
it("renders correctly with vertical direction", () => {
|
|
18
|
+
const { toJSON } = render(<Divider direction="vertical" />);
|
|
19
|
+
expect(toJSON()).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it("renders correctly with primary direction", () => {
|
|
23
|
+
const { toJSON } = render(<Divider direction="primary" />);
|
|
24
|
+
expect(toJSON()).toMatchSnapshot();
|
|
19
25
|
});
|
|
20
26
|
|
|
21
|
-
it("
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
const { toJSON } = render(<Divider orientation={orientation as any}>Divider</Divider>);
|
|
25
|
-
expect(toJSON()).toMatchSnapshot();
|
|
26
|
-
});
|
|
27
|
+
it("renders correctly with secondary direction", () => {
|
|
28
|
+
const { toJSON } = render(<Divider direction="secondary" />);
|
|
29
|
+
expect(toJSON()).toMatchSnapshot();
|
|
27
30
|
});
|
|
28
31
|
|
|
29
|
-
it("
|
|
30
|
-
const
|
|
31
|
-
const { toJSON } = render(<Divider size={size}>Divider</Divider>);
|
|
32
|
+
it("renders correctly with custom color", () => {
|
|
33
|
+
const { toJSON } = render(<Divider color="red" />);
|
|
32
34
|
expect(toJSON()).toMatchSnapshot();
|
|
33
35
|
});
|
|
34
36
|
|
|
35
|
-
it("
|
|
36
|
-
const {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
it("renders correctly with left orientation", () => {
|
|
38
|
+
const { getByText } = render(<Divider orientation="left">Left Oriented Text</Divider>);
|
|
39
|
+
expect(getByText("Left Oriented Text")).toBeTruthy();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("renders correctly with center orientation", () => {
|
|
43
|
+
const { getByText } = render(<Divider orientation="center">Center Oriented Text</Divider>);
|
|
44
|
+
expect(getByText("Center Oriented Text")).toBeTruthy();
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("renders correctly with right orientation", () => {
|
|
48
|
+
const { getByText } = render(<Divider orientation="right">Right Oriented Text</Divider>);
|
|
49
|
+
expect(getByText("Right Oriented Text")).toBeTruthy();
|
|
39
50
|
});
|
|
40
51
|
|
|
41
|
-
it("
|
|
42
|
-
const {
|
|
43
|
-
|
|
44
|
-
expect(text).toBeTruthy();
|
|
52
|
+
it("applies the correct styles based on custom margin", () => {
|
|
53
|
+
const { toJSON } = render(<Divider margin={[10, 20]} />);
|
|
54
|
+
expect(toJSON()).toMatchSnapshot();
|
|
45
55
|
});
|
|
46
56
|
|
|
47
|
-
it("
|
|
48
|
-
const {
|
|
49
|
-
|
|
50
|
-
expect(text).toBeTruthy();
|
|
57
|
+
it("applies the correct styles based on custom size", () => {
|
|
58
|
+
const { toJSON } = render(<Divider size={50} />);
|
|
59
|
+
expect(toJSON()).toMatchSnapshot();
|
|
51
60
|
});
|
|
52
61
|
|
|
53
|
-
it("
|
|
54
|
-
const {
|
|
55
|
-
|
|
56
|
-
expect(text).toBeTruthy();
|
|
62
|
+
it("applies the correct styles based on custom border number", () => {
|
|
63
|
+
const { toJSON } = render(<Divider stroke={2} />);
|
|
64
|
+
expect(toJSON()).toMatchSnapshot();
|
|
57
65
|
});
|
|
58
66
|
});
|
|
@@ -70,7 +70,6 @@ exports[`FAB Component > should apply position styles correctly 1`] = `
|
|
|
70
70
|
"backgroundColor": "rgba(255, 36, 66, 1)",
|
|
71
71
|
"borderColor": "rgba(255, 36, 66, 1)",
|
|
72
72
|
},
|
|
73
|
-
{},
|
|
74
73
|
]
|
|
75
74
|
}
|
|
76
75
|
>
|
|
@@ -168,7 +167,6 @@ exports[`FAB Component > should update boxWidth on layout change 1`] = `
|
|
|
168
167
|
"backgroundColor": "rgba(255, 36, 66, 1)",
|
|
169
168
|
"borderColor": "rgba(255, 36, 66, 1)",
|
|
170
169
|
},
|
|
171
|
-
{},
|
|
172
170
|
]
|
|
173
171
|
}
|
|
174
172
|
>
|