@coinbase/cds-mcp-server 8.17.2 → 8.17.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/CHANGELOG.md +8 -0
- package/mcp-docs/mobile/components/Accordion.txt +188 -0
- package/mcp-docs/mobile/components/AccordionItem.txt +29 -0
- package/mcp-docs/mobile/components/Alert.txt +155 -0
- package/mcp-docs/mobile/components/AreaChart.txt +265 -0
- package/mcp-docs/mobile/components/Avatar.txt +195 -0
- package/mcp-docs/mobile/components/AvatarButton.txt +225 -0
- package/mcp-docs/mobile/components/Banner.txt +221 -0
- package/mcp-docs/mobile/components/BarChart.txt +815 -0
- package/mcp-docs/mobile/components/Box.txt +173 -0
- package/mcp-docs/mobile/components/BrowserBar.txt +146 -0
- package/mcp-docs/mobile/components/Button.txt +198 -0
- package/mcp-docs/mobile/components/ButtonGroup.txt +79 -0
- package/mcp-docs/mobile/components/Carousel.txt +1083 -0
- package/mcp-docs/mobile/components/CartesianChart.txt +825 -0
- package/mcp-docs/mobile/components/CellMedia.txt +70 -0
- package/mcp-docs/mobile/components/Checkbox.txt +245 -0
- package/mcp-docs/mobile/components/CheckboxCell.txt +201 -0
- package/mcp-docs/mobile/components/CheckboxGroup.txt +284 -0
- package/mcp-docs/mobile/components/Chip.txt +194 -0
- package/mcp-docs/mobile/components/Coachmark.txt +157 -0
- package/mcp-docs/mobile/components/Collapsible.txt +104 -0
- package/mcp-docs/mobile/components/ContainedAssetCard.txt +134 -0
- package/mcp-docs/mobile/components/ContentCard.txt +365 -0
- package/mcp-docs/mobile/components/ContentCardBody.txt +135 -0
- package/mcp-docs/mobile/components/ContentCardFooter.txt +127 -0
- package/mcp-docs/mobile/components/ContentCardHeader.txt +145 -0
- package/mcp-docs/mobile/components/ContentCell.txt +226 -0
- package/mcp-docs/mobile/components/ControlGroup.txt +443 -0
- package/mcp-docs/mobile/components/DatePicker.txt +496 -0
- package/mcp-docs/mobile/components/Divider.txt +138 -0
- package/mcp-docs/mobile/components/DotCount.txt +145 -0
- package/mcp-docs/mobile/components/DotStatusColor.txt +58 -0
- package/mcp-docs/mobile/components/DotSymbol.txt +134 -0
- package/mcp-docs/mobile/components/Fallback.txt +157 -0
- package/mcp-docs/mobile/components/FloatingAssetCard.txt +155 -0
- package/mcp-docs/mobile/components/HStack.txt +234 -0
- package/mcp-docs/mobile/components/HeroSquare.txt +47 -0
- package/mcp-docs/mobile/components/Icon.txt +51 -0
- package/mcp-docs/mobile/components/IconButton.txt +268 -0
- package/mcp-docs/mobile/components/InputChip.txt +187 -0
- package/mcp-docs/mobile/components/Interactable.txt +186 -0
- package/mcp-docs/mobile/components/LineChart.txt +1324 -0
- package/mcp-docs/mobile/components/Link.txt +291 -0
- package/mcp-docs/mobile/components/ListCell.txt +412 -0
- package/mcp-docs/mobile/components/LogoMark.txt +84 -0
- package/mcp-docs/mobile/components/LogoWordMark.txt +93 -0
- package/mcp-docs/mobile/components/Lottie.txt +138 -0
- package/mcp-docs/mobile/components/LottieStatusAnimation.txt +46 -0
- package/mcp-docs/mobile/components/Modal.txt +83 -0
- package/mcp-docs/mobile/components/ModalBody.txt +33 -0
- package/mcp-docs/mobile/components/ModalFooter.txt +24 -0
- package/mcp-docs/mobile/components/ModalHeader.txt +27 -0
- package/mcp-docs/mobile/components/MultiContentModule.txt +379 -0
- package/mcp-docs/mobile/components/NavigationTitle.txt +131 -0
- package/mcp-docs/mobile/components/NavigationTitleSelect.txt +141 -0
- package/mcp-docs/mobile/components/NudgeCard.txt +89 -0
- package/mcp-docs/mobile/components/Numpad.txt +340 -0
- package/mcp-docs/mobile/components/Overlay.txt +151 -0
- package/mcp-docs/mobile/components/PageFooter.txt +160 -0
- package/mcp-docs/mobile/components/PageHeader.txt +185 -0
- package/mcp-docs/mobile/components/PeriodSelector.txt +407 -0
- package/mcp-docs/mobile/components/Pictogram.txt +47 -0
- package/mcp-docs/mobile/components/Point.txt +204 -0
- package/mcp-docs/mobile/components/PortalProvider.txt +78 -0
- package/mcp-docs/mobile/components/Pressable.txt +210 -0
- package/mcp-docs/mobile/components/ProgressBar.txt +129 -0
- package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +160 -0
- package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +137 -0
- package/mcp-docs/mobile/components/ProgressCircle.txt +236 -0
- package/mcp-docs/mobile/components/Radio.txt +241 -0
- package/mcp-docs/mobile/components/RadioCell.txt +201 -0
- package/mcp-docs/mobile/components/RadioGroup.txt +281 -0
- package/mcp-docs/mobile/components/ReferenceLine.txt +152 -0
- package/mcp-docs/mobile/components/RemoteImage.txt +105 -0
- package/mcp-docs/mobile/components/RemoteImageGroup.txt +60 -0
- package/mcp-docs/mobile/components/RollingNumber.txt +788 -0
- package/mcp-docs/mobile/components/Scrubber.txt +203 -0
- package/mcp-docs/mobile/components/SearchInput.txt +191 -0
- package/mcp-docs/mobile/components/SectionHeader.txt +204 -0
- package/mcp-docs/mobile/components/SegmentedTabs.txt +315 -0
- package/mcp-docs/mobile/components/Select.txt +211 -0
- package/mcp-docs/mobile/components/SelectChip.txt +323 -0
- package/mcp-docs/mobile/components/SelectOption.txt +84 -0
- package/mcp-docs/mobile/components/SlideButton.txt +330 -0
- package/mcp-docs/mobile/components/Spacer.txt +83 -0
- package/mcp-docs/mobile/components/Sparkline.txt +122 -0
- package/mcp-docs/mobile/components/SparklineGradient.txt +106 -0
- package/mcp-docs/mobile/components/SparklineInteractive.txt +156 -0
- package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +72 -0
- package/mcp-docs/mobile/components/Spinner.txt +48 -0
- package/mcp-docs/mobile/components/SpotIcon.txt +47 -0
- package/mcp-docs/mobile/components/SpotRectangle.txt +47 -0
- package/mcp-docs/mobile/components/SpotSquare.txt +47 -0
- package/mcp-docs/mobile/components/Stepper.txt +527 -0
- package/mcp-docs/mobile/components/SubBrandLogoMark.txt +125 -0
- package/mcp-docs/mobile/components/SubBrandLogoWordMark.txt +125 -0
- package/mcp-docs/mobile/components/Switch.txt +97 -0
- package/mcp-docs/mobile/components/TabIndicator.txt +48 -0
- package/mcp-docs/mobile/components/TabLabel.txt +153 -0
- package/mcp-docs/mobile/components/TabNavigation.txt +146 -0
- package/mcp-docs/mobile/components/TabbedChips.txt +142 -0
- package/mcp-docs/mobile/components/Tabs.txt +190 -0
- package/mcp-docs/mobile/components/Tag.txt +300 -0
- package/mcp-docs/mobile/components/Text.txt +211 -0
- package/mcp-docs/mobile/components/TextInput.txt +717 -0
- package/mcp-docs/mobile/components/ThemeProvider.txt +132 -0
- package/mcp-docs/mobile/components/Toast.txt +196 -0
- package/mcp-docs/mobile/components/Tooltip.txt +59 -0
- package/mcp-docs/mobile/components/TopNavBar.txt +161 -0
- package/mcp-docs/mobile/components/Tour.txt +158 -0
- package/mcp-docs/mobile/components/Tray.txt +252 -0
- package/mcp-docs/mobile/components/UpsellCard.txt +321 -0
- package/mcp-docs/mobile/components/VStack.txt +222 -0
- package/mcp-docs/mobile/components/XAxis.txt +621 -0
- package/mcp-docs/mobile/components/YAxis.txt +567 -0
- package/mcp-docs/mobile/getting-started/ai-overview.txt +108 -0
- package/mcp-docs/mobile/getting-started/installation.txt +57 -0
- package/mcp-docs/mobile/getting-started/introduction.txt +102 -0
- package/mcp-docs/mobile/getting-started/playground.txt +28 -0
- package/mcp-docs/mobile/getting-started/styling.txt +84 -0
- package/mcp-docs/mobile/getting-started/theming.txt +286 -0
- package/mcp-docs/mobile/hooks/useDimensions.txt +72 -0
- package/mcp-docs/mobile/hooks/useEventHandler.txt +120 -0
- package/mcp-docs/mobile/hooks/useMergeRefs.txt +116 -0
- package/mcp-docs/mobile/hooks/useOverlayContentContext.txt +280 -0
- package/mcp-docs/mobile/hooks/usePreviousValue.txt +74 -0
- package/mcp-docs/mobile/hooks/useRefMap.txt +178 -0
- package/mcp-docs/mobile/hooks/useTheme.txt +321 -0
- package/mcp-docs/mobile/routes.txt +139 -0
- package/mcp-docs/web/components/Accordion.txt +189 -0
- package/mcp-docs/web/components/AccordionItem.txt +31 -0
- package/mcp-docs/web/components/Alert.txt +164 -0
- package/mcp-docs/web/components/AreaChart.txt +510 -0
- package/mcp-docs/web/components/Avatar.txt +211 -0
- package/mcp-docs/web/components/AvatarButton.txt +240 -0
- package/mcp-docs/web/components/Banner.txt +226 -0
- package/mcp-docs/web/components/BarChart.txt +1267 -0
- package/mcp-docs/web/components/Box.txt +175 -0
- package/mcp-docs/web/components/Button.txt +212 -0
- package/mcp-docs/web/components/ButtonGroup.txt +79 -0
- package/mcp-docs/web/components/Calendar.txt +181 -0
- package/mcp-docs/web/components/Carousel.txt +1575 -0
- package/mcp-docs/web/components/CartesianChart.txt +1044 -0
- package/mcp-docs/web/components/CellMedia.txt +56 -0
- package/mcp-docs/web/components/Checkbox.txt +188 -0
- package/mcp-docs/web/components/CheckboxCell.txt +202 -0
- package/mcp-docs/web/components/CheckboxGroup.txt +219 -0
- package/mcp-docs/web/components/Chip.txt +196 -0
- package/mcp-docs/web/components/Coachmark.txt +188 -0
- package/mcp-docs/web/components/Collapsible.txt +119 -0
- package/mcp-docs/web/components/ContainedAssetCard.txt +232 -0
- package/mcp-docs/web/components/ContentCard.txt +367 -0
- package/mcp-docs/web/components/ContentCardBody.txt +137 -0
- package/mcp-docs/web/components/ContentCardFooter.txt +129 -0
- package/mcp-docs/web/components/ContentCardHeader.txt +147 -0
- package/mcp-docs/web/components/ContentCell.txt +219 -0
- package/mcp-docs/web/components/ControlGroup.txt +436 -0
- package/mcp-docs/web/components/DatePicker.txt +505 -0
- package/mcp-docs/web/components/Divider.txt +143 -0
- package/mcp-docs/web/components/DotCount.txt +149 -0
- package/mcp-docs/web/components/DotStatusColor.txt +58 -0
- package/mcp-docs/web/components/DotSymbol.txt +137 -0
- package/mcp-docs/web/components/Dropdown.txt +119 -0
- package/mcp-docs/web/components/Fallback.txt +163 -0
- package/mcp-docs/web/components/FloatingAssetCard.txt +250 -0
- package/mcp-docs/web/components/FullscreenAlert.txt +69 -0
- package/mcp-docs/web/components/FullscreenModal.txt +145 -0
- package/mcp-docs/web/components/FullscreenModalLayout.txt +187 -0
- package/mcp-docs/web/components/Grid.txt +236 -0
- package/mcp-docs/web/components/GridColumn.txt +209 -0
- package/mcp-docs/web/components/HStack.txt +236 -0
- package/mcp-docs/web/components/HeroSquare.txt +48 -0
- package/mcp-docs/web/components/Icon.txt +145 -0
- package/mcp-docs/web/components/IconButton.txt +390 -0
- package/mcp-docs/web/components/InputChip.txt +187 -0
- package/mcp-docs/web/components/Interactable.txt +193 -0
- package/mcp-docs/web/components/LineChart.txt +1576 -0
- package/mcp-docs/web/components/Link.txt +243 -0
- package/mcp-docs/web/components/ListCell.txt +418 -0
- package/mcp-docs/web/components/LogoMark.txt +84 -0
- package/mcp-docs/web/components/LogoWordMark.txt +93 -0
- package/mcp-docs/web/components/Lottie.txt +157 -0
- package/mcp-docs/web/components/LottieStatusAnimation.txt +57 -0
- package/mcp-docs/web/components/MediaQueryProvider.txt +108 -0
- package/mcp-docs/web/components/Modal.txt +196 -0
- package/mcp-docs/web/components/ModalBody.txt +117 -0
- package/mcp-docs/web/components/ModalFooter.txt +119 -0
- package/mcp-docs/web/components/ModalHeader.txt +123 -0
- package/mcp-docs/web/components/MultiContentModule.txt +381 -0
- package/mcp-docs/web/components/NavigationBar.txt +102 -0
- package/mcp-docs/web/components/NavigationTitle.txt +25 -0
- package/mcp-docs/web/components/NavigationTitleSelect.txt +45 -0
- package/mcp-docs/web/components/NudgeCard.txt +181 -0
- package/mcp-docs/web/components/Overlay.txt +171 -0
- package/mcp-docs/web/components/PageFooter.txt +184 -0
- package/mcp-docs/web/components/PageHeader.txt +243 -0
- package/mcp-docs/web/components/Pagination.txt +499 -0
- package/mcp-docs/web/components/PeriodSelector.txt +703 -0
- package/mcp-docs/web/components/Pictogram.txt +48 -0
- package/mcp-docs/web/components/Point.txt +460 -0
- package/mcp-docs/web/components/PortalProvider.txt +76 -0
- package/mcp-docs/web/components/Pressable.txt +193 -0
- package/mcp-docs/web/components/ProgressBar.txt +163 -0
- package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +212 -0
- package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +181 -0
- package/mcp-docs/web/components/ProgressCircle.txt +443 -0
- package/mcp-docs/web/components/Radio.txt +219 -0
- package/mcp-docs/web/components/RadioCell.txt +215 -0
- package/mcp-docs/web/components/RadioGroup.txt +288 -0
- package/mcp-docs/web/components/ReferenceLine.txt +451 -0
- package/mcp-docs/web/components/RemoteImage.txt +165 -0
- package/mcp-docs/web/components/RemoteImageGroup.txt +86 -0
- package/mcp-docs/web/components/RollingNumber.txt +1021 -0
- package/mcp-docs/web/components/Scrubber.txt +231 -0
- package/mcp-docs/web/components/SearchInput.txt +117 -0
- package/mcp-docs/web/components/SectionHeader.txt +217 -0
- package/mcp-docs/web/components/SegmentedTabs.txt +324 -0
- package/mcp-docs/web/components/Select.txt +224 -0
- package/mcp-docs/web/components/SelectChip.txt +314 -0
- package/mcp-docs/web/components/SelectOption.txt +165 -0
- package/mcp-docs/web/components/Sidebar.txt +349 -0
- package/mcp-docs/web/components/SidebarItem.txt +131 -0
- package/mcp-docs/web/components/SidebarMoreMenu.txt +30 -0
- package/mcp-docs/web/components/Spacer.txt +173 -0
- package/mcp-docs/web/components/Sparkline.txt +122 -0
- package/mcp-docs/web/components/SparklineGradient.txt +106 -0
- package/mcp-docs/web/components/SparklineInteractive.txt +153 -0
- package/mcp-docs/web/components/SparklineInteractiveHeader.txt +76 -0
- package/mcp-docs/web/components/Spinner.txt +128 -0
- package/mcp-docs/web/components/SpotIcon.txt +48 -0
- package/mcp-docs/web/components/SpotRectangle.txt +48 -0
- package/mcp-docs/web/components/SpotSquare.txt +48 -0
- package/mcp-docs/web/components/Stepper.txt +682 -0
- package/mcp-docs/web/components/SubBrandLogoMark.txt +125 -0
- package/mcp-docs/web/components/SubBrandLogoWordMark.txt +125 -0
- package/mcp-docs/web/components/Switch.txt +85 -0
- package/mcp-docs/web/components/TabIndicator.txt +48 -0
- package/mcp-docs/web/components/TabLabel.txt +158 -0
- package/mcp-docs/web/components/TabNavigation.txt +159 -0
- package/mcp-docs/web/components/TabbedChips.txt +155 -0
- package/mcp-docs/web/components/Table.txt +367 -0
- package/mcp-docs/web/components/TableBody.txt +83 -0
- package/mcp-docs/web/components/TableCaption.txt +102 -0
- package/mcp-docs/web/components/TableCell.txt +165 -0
- package/mcp-docs/web/components/TableCellFallback.txt +97 -0
- package/mcp-docs/web/components/TableFooter.txt +83 -0
- package/mcp-docs/web/components/TableHeader.txt +100 -0
- package/mcp-docs/web/components/TableRow.txt +140 -0
- package/mcp-docs/web/components/Tabs.txt +212 -0
- package/mcp-docs/web/components/Tag.txt +304 -0
- package/mcp-docs/web/components/Text.txt +232 -0
- package/mcp-docs/web/components/TextInput.txt +652 -0
- package/mcp-docs/web/components/ThemeProvider.txt +199 -0
- package/mcp-docs/web/components/TileButton.txt +158 -0
- package/mcp-docs/web/components/Toast.txt +203 -0
- package/mcp-docs/web/components/Tooltip.txt +89 -0
- package/mcp-docs/web/components/Tour.txt +179 -0
- package/mcp-docs/web/components/Tray.txt +288 -0
- package/mcp-docs/web/components/UpsellCard.txt +319 -0
- package/mcp-docs/web/components/VStack.txt +224 -0
- package/mcp-docs/web/components/XAxis.txt +619 -0
- package/mcp-docs/web/components/YAxis.txt +548 -0
- package/mcp-docs/web/getting-started/ai-overview.txt +108 -0
- package/mcp-docs/web/getting-started/installation.txt +103 -0
- package/mcp-docs/web/getting-started/introduction.txt +102 -0
- package/mcp-docs/web/getting-started/playground.txt +28 -0
- package/mcp-docs/web/getting-started/styling.txt +161 -0
- package/mcp-docs/web/getting-started/templates.txt +121 -0
- package/mcp-docs/web/getting-started/theming.txt +426 -0
- package/mcp-docs/web/hooks/useBreakpoints.txt +61 -0
- package/mcp-docs/web/hooks/useDimensions.txt +114 -0
- package/mcp-docs/web/hooks/useEventHandler.txt +120 -0
- package/mcp-docs/web/hooks/useHasMounted.txt +75 -0
- package/mcp-docs/web/hooks/useIsoEffect.txt +58 -0
- package/mcp-docs/web/hooks/useMediaQuery.txt +114 -0
- package/mcp-docs/web/hooks/useMergeRefs.txt +116 -0
- package/mcp-docs/web/hooks/useOverlayContentContext.txt +279 -0
- package/mcp-docs/web/hooks/usePreviousValue.txt +74 -0
- package/mcp-docs/web/hooks/useRefMap.txt +178 -0
- package/mcp-docs/web/hooks/useScrollBlocker.txt +82 -0
- package/mcp-docs/web/hooks/useTheme.txt +364 -0
- package/mcp-docs/web/routes.txt +163 -0
- package/package.json +1 -1
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# SparklineInteractive
|
|
2
|
+
|
|
3
|
+
The SparklineInteractive is used to display a Sparkline that has multiple time periods
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SparklineInteractive } from '@coinbase/cds-mobile-visualization'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Default usage
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<Box padding={3} width="100%">
|
|
17
|
+
<SparklineInteractivePrice data={sparklineInteractiveData} strokeColor="#F7931A" />
|
|
18
|
+
</Box>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Fill Type
|
|
22
|
+
|
|
23
|
+
The fill will be added by default with a gradient style. You can set `fillType="dotted"` to get a dotted gradient fill.
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
<Box padding={3} width="100%">
|
|
27
|
+
<SparklineInteractivePrice
|
|
28
|
+
fill
|
|
29
|
+
data={sparklineInteractiveData}
|
|
30
|
+
fillType="dotted"
|
|
31
|
+
strokeColor="#F7931A"
|
|
32
|
+
/>
|
|
33
|
+
</Box>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Compact
|
|
37
|
+
|
|
38
|
+
```jsx
|
|
39
|
+
<Box padding={3} width="100%">
|
|
40
|
+
<SparklineInteractivePrice data={sparklineInteractiveData} compact strokeColor="#F7931A" />
|
|
41
|
+
</Box>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Hide period selector
|
|
45
|
+
|
|
46
|
+
```jsx
|
|
47
|
+
<Box padding={3} width="100%">
|
|
48
|
+
<SparklineInteractivePrice
|
|
49
|
+
data={sparklineInteractiveData}
|
|
50
|
+
hidePeriodSelector
|
|
51
|
+
strokeColor="#F7931A"
|
|
52
|
+
/>
|
|
53
|
+
</Box>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Scaling Factor
|
|
57
|
+
|
|
58
|
+
The scaling factor is usually used when you want to show less variance in the chart. An example of this is a stable coin that doesn't change price by more than a few cents.
|
|
59
|
+
|
|
60
|
+
```jsx
|
|
61
|
+
<Box padding={3} width="100%">
|
|
62
|
+
<SparklineInteractivePrice
|
|
63
|
+
data={sparklineInteractiveData}
|
|
64
|
+
strokeColor="#F7931A"
|
|
65
|
+
yAxisScalingFactor={0.1}
|
|
66
|
+
/>
|
|
67
|
+
</Box>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### With header
|
|
71
|
+
|
|
72
|
+
```jsx
|
|
73
|
+
<Box padding={3} width="100%">
|
|
74
|
+
<SparklineInteractivePriceWithHeader data={sparklineInteractiveData} fill strokeColor="#F7931A" />
|
|
75
|
+
</Box>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Custom hover data
|
|
79
|
+
|
|
80
|
+
```jsx
|
|
81
|
+
<Box padding={3} width="100%">
|
|
82
|
+
<SparklineInteractivePrice
|
|
83
|
+
fill
|
|
84
|
+
data={sparklineInteractiveData}
|
|
85
|
+
hoverData={sparklineInteractiveHoverData}
|
|
86
|
+
strokeColor="#F7931A"
|
|
87
|
+
/>
|
|
88
|
+
</Box>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Period selector placement
|
|
92
|
+
|
|
93
|
+
`periodSelectorPlacement` can be used to place the period selector in different positions (`above` or `below`).
|
|
94
|
+
|
|
95
|
+
```jsx
|
|
96
|
+
<Box padding={3} width="100%">
|
|
97
|
+
<SparklineInteractivePrice
|
|
98
|
+
data={sparklineInteractiveData}
|
|
99
|
+
strokeColor="#F7931A"
|
|
100
|
+
periodSelectorPlacement="below"
|
|
101
|
+
/>
|
|
102
|
+
</Box>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Custom styles
|
|
106
|
+
|
|
107
|
+
You can also provide custom styles, such as to remove bottom padding from the header.
|
|
108
|
+
|
|
109
|
+
```jsx
|
|
110
|
+
<Box padding={3} width="100%">
|
|
111
|
+
<SparklineInteractivePriceWithHeader
|
|
112
|
+
data={sparklineInteractiveData}
|
|
113
|
+
fill
|
|
114
|
+
strokeColor="#F7931A"
|
|
115
|
+
styles={{ header: { paddingBottom: 0 } }}
|
|
116
|
+
/>
|
|
117
|
+
</Box>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Props
|
|
121
|
+
|
|
122
|
+
| Prop | Type | Required | Default | Description |
|
|
123
|
+
| --- | --- | --- | --- | --- |
|
|
124
|
+
| `defaultPeriod` | `string` | Yes | `-` | default period value that the chart will use |
|
|
125
|
+
| `formatDate` | `ChartFormatDate<Period>` | Yes | `-` | function used to format the date that is shown in the bottom of the chart as the user scrubs |
|
|
126
|
+
| `periods` | `{ label: string; value: Period; }[]` | Yes | `-` | A list of periods that the chart will use. label is what is shown in the bottom of the chart and the value is the key. |
|
|
127
|
+
| `strokeColor` | `string` | Yes | `-` | Color of the line* |
|
|
128
|
+
| `allowOverflowGestures` | `boolean` | No | `-` | Allows continuous gestures on the Sparkline chart to continue outside the bounds of the chart element. |
|
|
129
|
+
| `compact` | `boolean` | No | `false` | Show the chart in compact height |
|
|
130
|
+
| `data` | `Record<Period, ChartData>` | No | `-` | Chart data bucketed by Period. Period is a string key |
|
|
131
|
+
| `disableHorizontalPadding` | `boolean` | No | `-` | The chart applies horizontal padding by default which is specified by the gutter. If the chart is placed in a container with padding then you can disable horizontal padding and set the gutter to match the container padding. |
|
|
132
|
+
| `disableScrubbing` | `boolean` | No | `false` | Disables the scrub user interaction from the chart |
|
|
133
|
+
| `fallback` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Fallback shown in the chart when data is not available. This is usually a loading state. |
|
|
134
|
+
| `fallbackType` | `positive \| negative` | No | `-` | If you use the default fallback then this specifies if the fallback line is decreasing or increasing |
|
|
135
|
+
| `fill` | `boolean` | No | `true` | Adds an area fill to the Sparkline |
|
|
136
|
+
| `fillType` | `dotted \| gradient` | No | `'gradient'` | Type of fill to use for the area |
|
|
137
|
+
| `formatHoverDate` | `((date: Date, period: Period) => string)` | No | `-` | Formats the date above the chart as you scrub. Omit this if you dont want to show the date as the user scrubs |
|
|
138
|
+
| `formatHoverPrice` | `((price: number) => string)` | No | `-` | Formats the price above the chart as you scrub. Omit this if you dont want to show the price as the user scrubs |
|
|
139
|
+
| `formatMinMaxLabel` | `ChartFormatAmount` | No | `-` | function used to format the amount of money used in the minMaxLabel |
|
|
140
|
+
| `gutter` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `3` | The amount of padding to apply to the left and right of the chart. The chart width is calculated by (screen width - 2* gutter). |
|
|
141
|
+
| `headerNode` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Adds a header node above the chart. It will be placed next to the period selector on web. |
|
|
142
|
+
| `headerTestID` | `string` | No | `-` | Test ID for the header |
|
|
143
|
+
| `hideMinMaxLabel` | `boolean` | No | `false` | Hides the min and max label |
|
|
144
|
+
| `hidePeriodSelector` | `boolean` | No | `false` | Hides the period selector at the bottom of the chart |
|
|
145
|
+
| `hoverData` | `Record<Period, ChartTimeseries[]>` | No | `-` | Optional data to show on hover/scrub instead of the original sparkline. This allows multiple timeseries lines. Period => timeseries list |
|
|
146
|
+
| `onPeriodChanged` | `((period: Period) => void)` | No | `-` | Callback when the user selects a new period. |
|
|
147
|
+
| `onScrub` | `((params: ChartScrubParams<Period>) => void)` | No | `-` | Callback used when the user is scrubbing. This will be called for every data point change. |
|
|
148
|
+
| `onScrubEnd` | `(() => void)` | No | `-` | Callback when a user finishes scrubbing |
|
|
149
|
+
| `onScrubStart` | `(() => void)` | No | `-` | Callback when the user starts scrubbing |
|
|
150
|
+
| `periodSelectorPlacement` | `above \| below` | No | `-` | Optional placement prop that position the period selector component above or below the chart |
|
|
151
|
+
| `style` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>>` | No | `-` | Custom style for the root element. |
|
|
152
|
+
| `styles` | `{ header?: StyleProp<ViewStyle>; root?: StyleProp<ViewStyle>; }` | No | `-` | Custom styles for the component. |
|
|
153
|
+
| `timePeriodGutter` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Optional gutter to add to the Period selector. This is useful if you choose to use the full screen width for the chart |
|
|
154
|
+
| `yAxisScalingFactor` | `number` | No | `-` | Scales the sparkline to show more or less variance. Use a number less than 1 for less variance and a number greater than 1 for more variance. If you use a number greater than 1 it may clip the boundaries of the sparkline. |
|
|
155
|
+
|
|
156
|
+
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# SparklineInteractiveHeader
|
|
2
|
+
|
|
3
|
+
The SparklineInteractiveHeader is used to display chart information that changes over time
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SparklineInteractiveHeader } from '@coinbase/cds-mobile-visualization'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Default usage
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<Box padding={3} width="100%">
|
|
17
|
+
<SparklineInteractivePriceWithHeader data={sparklineInteractiveData} strokeColor="#F7931A" />
|
|
18
|
+
</Box>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Fill
|
|
22
|
+
|
|
23
|
+
The fill will be added by default
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
<Box padding={3} width="100%">
|
|
27
|
+
<SparklineInteractivePriceWithHeader data={sparklineInteractiveData} fill strokeColor="#F7931A" />
|
|
28
|
+
</Box>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Compact
|
|
32
|
+
|
|
33
|
+
```jsx
|
|
34
|
+
<Box padding={3} width="100%">
|
|
35
|
+
<SparklineInteractivePriceWithHeader
|
|
36
|
+
compact
|
|
37
|
+
fill
|
|
38
|
+
strokeColor="#F7931A"
|
|
39
|
+
data={sparklineInteractiveData}
|
|
40
|
+
/>
|
|
41
|
+
</Box>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Custom Label
|
|
45
|
+
|
|
46
|
+
```jsx
|
|
47
|
+
<Box padding={3} width="100%">
|
|
48
|
+
<SparklineInteractivePriceWithHeader
|
|
49
|
+
data={sparklineInteractiveData}
|
|
50
|
+
strokeColor="#F7931A"
|
|
51
|
+
labelNode={
|
|
52
|
+
<HStack gap={1} alignItems="center" paddingBottom={0}>
|
|
53
|
+
<Icon active name="wallet" size="s" />
|
|
54
|
+
<TextTitle3 as="span">CustomHeader</TextTitle3>
|
|
55
|
+
</HStack>
|
|
56
|
+
}
|
|
57
|
+
/>
|
|
58
|
+
</Box>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Props
|
|
62
|
+
|
|
63
|
+
| Prop | Type | Required | Default | Description |
|
|
64
|
+
| --- | --- | --- | --- | --- |
|
|
65
|
+
| `percent` | `string` | Yes | `-` | Free form percentage change |
|
|
66
|
+
| `sign` | ` \| positive \| negative \| upwardTrend \| downwardTrend` | Yes | `-` | Sign to denote the change in price |
|
|
67
|
+
| `variant` | `positive \| negative \| foregroundMuted` | Yes | `-` | The variant to use for the price and percentage change |
|
|
68
|
+
| `accessibilityLabel` | `string` | No | `-` | The accessibilityLabel to show for the price and / or percentage change. This should be localized |
|
|
69
|
+
| `accessoryText` | `string` | No | `-` | The accessoryText to show after the price and / or percentage change. An example is All time |
|
|
70
|
+
| `priceChange` | `string` | No | `-` | Show the dollar amount of price change |
|
|
71
|
+
|
|
72
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Spinner
|
|
2
|
+
|
|
3
|
+
A component that displays a spinning animation.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Spinner } from '@coinbase/cds-mobile/loaders/Spinner'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
Basic example
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<Spinner />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Large spinner
|
|
20
|
+
|
|
21
|
+
```jsx
|
|
22
|
+
<Spinner size="large" />
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
| Prop | Type | Required | Default | Description |
|
|
28
|
+
| --- | --- | --- | --- | --- |
|
|
29
|
+
| `animating` | `boolean` | No | `-` | Whether to show the indicator (true, the default) or hide it (false). |
|
|
30
|
+
| `color` | `string \| OpaqueColorValue` | No | `-` | The foreground color of the spinner (default is gray). |
|
|
31
|
+
| `hidesWhenStopped` | `boolean` | No | `-` | Whether the indicator should hide when not animating (true by default). |
|
|
32
|
+
| `onPointerCancel` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
33
|
+
| `onPointerCancelCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
34
|
+
| `onPointerDown` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
35
|
+
| `onPointerDownCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
36
|
+
| `onPointerEnter` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
37
|
+
| `onPointerEnterCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
38
|
+
| `onPointerLeave` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
39
|
+
| `onPointerLeaveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
40
|
+
| `onPointerMove` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
41
|
+
| `onPointerMoveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
42
|
+
| `onPointerUp` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
43
|
+
| `onPointerUpCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
44
|
+
| `size` | `number \| small \| large` | No | `-` | Size of the indicator. Small has a height of 20, large has a height of 36. enum(small, large) |
|
|
45
|
+
| `style` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>>` | No | `-` | - |
|
|
46
|
+
| `testID` | `string` | No | `-` | Used to locate this view in end-to-end tests. |
|
|
47
|
+
|
|
48
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# SpotIcon
|
|
2
|
+
|
|
3
|
+
An icon-sized illustration component for displaying spot graphics.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SpotIcon } from '@coinbase/cds-mobile/illustratations/SpotIcon'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Basic example
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<SpotIcon name="shield" dimension="32x32" />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### `scaleMultiplier` prop
|
|
20
|
+
|
|
21
|
+
If no predefined dimensions fit your use case, you can use the `scaleMultiplier` prop to scale the illustration.
|
|
22
|
+
|
|
23
|
+
Use `scaleMultiplier` sparingly and with caution. We have predefined dimensions to ensure that illustrations scale elegantly.
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
<SpotIcon name="shield" scaleMultiplier={1.5} />
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Scaling with dimension
|
|
30
|
+
|
|
31
|
+
If `dimension` and `scaleMultiplier` are both provided the component will scale based on the provided dimension.
|
|
32
|
+
|
|
33
|
+
```jsx
|
|
34
|
+
<SpotIcon name="shield" dimension="24x24" scaleMultiplier={1.5} />
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Props
|
|
38
|
+
|
|
39
|
+
| Prop | Type | Required | Default | Description |
|
|
40
|
+
| --- | --- | --- | --- | --- |
|
|
41
|
+
| `name` | `done \| warning \| error \| advancedTradeProduct \| assetHubProduct \| assetManagementProduct \| bank \| base \| borrowProduct \| cloudProduct \| coinbase \| commerceProduct \| custodyProduct \| delegateProduct \| derivativesProduct \| email \| exchangeProduct \| helpCenterProduct \| institutionalProduct \| learningRewardsProduct \| nftProduct \| nodeProduct \| participateProduct \| privateClientProduct \| rewardsProduct \| rosettaProduct \| shield \| venturesProduct \| wallet \| walletLogo \| 2fa \| authenticator \| bonusFivePercent \| bonusTwoPercent \| businessProduct \| chat \| coinbaseOneEarn \| coinbaseOneProductInvestWeekly \| creditCard \| delegate \| fast \| idVerification \| outage \| pieChart \| recurringPurchases \| send \| layeredNetworks \| noFees \| assetEmptyStateAa \| assetEmptyStateAb \| assetEmptyStateAc \| assetEmptyStateAd \| assetEmptyStateAe \| assetEmptyStateBa \| assetEmptyStateBb \| assetEmptyStateBc \| assetEmptyStateBd \| assetEmptyStateBe \| assetEmptyStateCa \| assetEmptyStateCb \| assetEmptyStateCc \| assetEmptyStateCd \| assetEmptyStateCe \| assetEmptyStateDa \| assetEmptyStateDb \| assetEmptyStateDc \| assetEmptyStateDd \| assetEmptyStateDe \| assetEmptyStateEa \| assetEmptyStateEb \| assetEmptyStateEc \| assetEmptyStateEd \| assetEmptyStateEe \| cb1Cash \| coinbaseOneChart \| coinbaseOneProduct \| contract \| dataMarketplace \| internationalExchangeProduct \| multiCoin \| paySDKProduct \| primeProduct \| productCoinbaseCard \| productCompliance \| productEarn \| productPro \| productWallet \| signInProduct \| stakingProduct \| walletAsAServiceProduct` | Yes | `-` | Name of illustration as defined in Figma |
|
|
42
|
+
| `dimension` | `32x32 \| 24x24` | No | `-` | HeroSquare Default: 240x240 SpotSquare Default: 96x96 Pictogram Default: 48x48 SpotRectangle Default: 240x120 |
|
|
43
|
+
| `fallback` | `ReactElement<any, string \| JSXElementConstructor<any>> \| null` | No | `null` | Fallback element to render if unable to find an illustration with the matching name |
|
|
44
|
+
| `scaleMultiplier` | `number` | No | `-` | Multiply the width & height while maintaining aspect ratio |
|
|
45
|
+
| `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
|
|
46
|
+
|
|
47
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# SpotRectangle
|
|
2
|
+
|
|
3
|
+
A rectangular illustration component for displaying spot graphics.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SpotRectangle } from '@coinbase/cds-mobile/illustratations/SpotRectangle'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Basic example
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<SpotRectangle name="creditCardExcitement" />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### `scaleMultiplier` prop
|
|
20
|
+
|
|
21
|
+
If no predefined dimensions fit your use case, you can use the `scaleMultiplier` prop to scale the illustration.
|
|
22
|
+
|
|
23
|
+
Use `scaleMultiplier` sparingly and with caution. We have predefined dimensions to ensure that illustrations scale elegantly.
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
<SpotRectangle name="creditCardExcitement" scaleMultiplier={1.5} />
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Scaling with dimension
|
|
30
|
+
|
|
31
|
+
If `dimension` and `scaleMultiplier` are both provided the component will scale based on the provided dimension.
|
|
32
|
+
|
|
33
|
+
```jsx
|
|
34
|
+
<SpotRectangle name="creditCardExcitement" dimension="240x120" scaleMultiplier={1.5} />
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Props
|
|
38
|
+
|
|
39
|
+
| Prop | Type | Required | Default | Description |
|
|
40
|
+
| --- | --- | --- | --- | --- |
|
|
41
|
+
| `name` | `margin \| blockchain \| bridging \| calendar \| coinbaseOneLogo \| concierge \| diamond \| earn \| login \| nft \| securityShield \| staking \| tokenSales \| cb1BankTransfers \| ethStakingRewards \| futures \| globalTransactions \| governance \| lightningNetworkSend \| startToday \| usdcLoan \| wrapEth \| phoneNumber \| accessToAdvancedCharts \| addPhoneNumber \| advancedTrading \| advancedTradingChartsIndicatorsCandles \| advancedTradingUi \| appTrackingTransparency \| automaticPayments \| backedByUsDollar \| basedInUsa \| bigBtc \| borrowWallet \| browserExtension \| cardBoosted \| cbbtc \| coinbaseCardLock \| coinbaseCardPocket \| coinbaseFees \| coinbaseOneDiscountedAmount \| coinbaseOnePhoneLightning \| coinbaseOneRewards \| coinbaseOneSavingFunds \| collectingNfts \| commerceAccounting \| commerceInvoices \| completeAQuiz \| congratulationsOnEarningCrypto \| contactsListWarning \| crossBorderPayments \| cryptoAndMore \| cryptoApps \| cryptoAssets \| cryptoEconomy \| cryptoForBeginners \| cryptoPortfolio \| cryptoWallet \| decentralization \| decentralizedWebWeb3 \| defiDecentralizedBorrowingLending \| defiDecentralizedTradingExchange \| defiEarn \| defiHow \| defiRisk \| didDecentralizedIdentity \| digitalCollectibles \| documentCertified \| documentSuccess \| earnInterest \| earnToLearn \| encryptedEverything \| estimatedAmount \| exploreDecentralizedApps \| fileYourCryptoTaxes \| fileYourCryptoTaxesCheck \| focusLimitOrders \| freeBtc \| gainsAndLosses \| gasFeesNetworkFees \| getStartedInMinutes \| graphChartTrading \| hardwareWallets \| holdCrypto \| holdingCrypto \| insuranceProtection \| invest \| layeredNetworks \| leverage \| linkingYourWalletToYourCoinbaseAccount \| liquidationBufferGreen \| liquidationBufferRed \| liquidationBufferYellow \| marginWarning \| mining \| moneyDecentralized \| multicoinSupport \| multiPlatformMobileAppBrowserExtension \| multipleAccountsWalletsForOneUser \| noFees \| notificationsAlt \| onTheList \| openEmail \| optInPushNotificationsEmail \| p2pPayments \| portfolioPerformance \| poweredByEthereum \| primeDeFi \| primeEarn \| primeStaking \| quickAndSimple \| readyToTrade \| referralsBitcoin \| referralsCoinbaseOne \| referralsGenericCoin \| retailUSDCRewards \| secureAndTrusted \| secureGlobalTransactions \| secureStorage \| selfCustody \| semiCustodial \| sendCryptoFaster \| shareOnSocialMedia \| sidechain \| stableValue \| stayInControlSelfHostedWalletsStorage \| stressTestedColdStorage \| switchAdvancedToSimpleTrading \| taxesDetails \| tradeImmediately \| trendingHotAssets \| verifyEmail \| verifyInfo \| walletNotifications \| walletSecurity \| watchVideos \| addBank \| advancedTradeCharts \| apiKey \| appUpdate \| borrowLoan \| browserHistory \| cardWaitlist \| cbEth \| clawMachinePig \| coinGateway \| connectWalletTutorial \| creditCardExcitement \| creditCardExcitementCoinbaseOne \| cryptoEconomyCoin \| cryptoEconomyEurc \| cryptoEconomyUSDC \| currency \| derivativesLoop \| downloadCoinbaseWalletArrow \| downloadingStatement \| emptyNfts \| emptyTrading \| eth2SellSend \| eth2SendSell \| eth2SendSellTwo \| ethAddress \| ethStakeOrWrap \| ethStakeOrWrapTwo \| ethStakingMovement \| ethTrading \| ethTradingTwo \| ethWrappedStakingRewards \| faceId \| fiatInterest \| giftBoxRewards \| highFees \| leadingProtocol \| leadingProtocolMorpho \| ledgerFailed \| ledgerSignatureRejected \| lendGraph \| linkCoinbaseWallet \| loanValue \| noTransactions \| portfolioOverview \| portfolioOverviewRelaunch \| primeOrderConfirmation \| primePriceLadder \| primeTradePreferences \| protectedNotes \| ratDashboard \| ratFoundWallet \| ratMigration \| ratMigrationerror \| referralsBonus \| scanCode \| secureAccount \| sendingCrypto \| trade \| transferCoins \| transferEth \| transferFunds \| trustedContacts \| unauthorizedTransfers \| uob \| update \| uploadDocument \| walletReconnect \| walletReconnectSuccess \| wrapEthTwo \| yieldHolding` | Yes | `-` | Name of illustration as defined in Figma |
|
|
42
|
+
| `dimension` | `240x120` | No | `-` | HeroSquare Default: 240x240 SpotSquare Default: 96x96 Pictogram Default: 48x48 SpotRectangle Default: 240x120 |
|
|
43
|
+
| `fallback` | `ReactElement<any, string \| JSXElementConstructor<any>> \| null` | No | `null` | Fallback element to render if unable to find an illustration with the matching name |
|
|
44
|
+
| `scaleMultiplier` | `number` | No | `-` | Multiply the width & height while maintaining aspect ratio |
|
|
45
|
+
| `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
|
|
46
|
+
|
|
47
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# SpotSquare
|
|
2
|
+
|
|
3
|
+
A square-shaped illustration component for displaying spot graphics.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SpotSquare } from '@coinbase/cds-mobile/illustratations/SpotSquare'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Basic example
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<SpotSquare name="yieldCenterUSDC" />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### `scaleMultiplier` prop
|
|
20
|
+
|
|
21
|
+
If no predefined dimensions fit your use case, you can use the `scaleMultiplier` prop to scale the illustration.
|
|
22
|
+
|
|
23
|
+
Use `scaleMultiplier` sparingly and with caution. We have predefined dimensions to ensure that illustrations scale elegantly.
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
<SpotSquare name="yieldCenterUSDC" scaleMultiplier={1.5} />
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Scaling with dimension
|
|
30
|
+
|
|
31
|
+
If `dimension` and `scaleMultiplier` are both provided the component will scale based on the provided dimension.
|
|
32
|
+
|
|
33
|
+
```jsx
|
|
34
|
+
<SpotSquare name="yieldCenterUSDC" dimension="120x120" scaleMultiplier={1.5} />
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Props
|
|
38
|
+
|
|
39
|
+
| Prop | Type | Required | Default | Description |
|
|
40
|
+
| --- | --- | --- | --- | --- |
|
|
41
|
+
| `name` | `blockchain \| bridging \| coinbaseOneLogo \| earn \| nft \| options \| priceAlerts \| refresh \| securityShield \| staking \| addCard \| bonusFivePercent \| bonusTwoPercent \| cardBlocked \| cardDeclined \| coinbaseOneEarn \| coinbaseUnlockOffers \| ethStaking \| ethStakingRewards \| futures \| globalTransactions \| idError \| lightningNetworkSend \| outage \| startToday \| wrapEth \| phoneNumber \| accessToAdvancedCharts \| addPhoneNumber \| advancedTrading \| advancedTradingChartsIndicatorsCandles \| advancedTradingUi \| appTrackingTransparency \| automaticPayments \| backedByUsDollar \| baseCreatorCoin \| basedInUsa \| bigBtc \| borrowWallet \| browserExtension \| coinbaseCardLock \| coinbaseCardPocket \| coinbaseFees \| coinbaseOneDiscountedAmount \| coinbaseOneRewards \| coinbaseOneSavingFunds \| coinbaseOneTokenRewards \| coinbaseOneZeroPortal \| coinFifty \| collectingNfts \| commerceAccounting \| commerceInvoices \| completeAQuiz \| congratulationsOnEarningCrypto \| contactsListWarning \| crossBorderPayments \| cryptoAndMore \| cryptoApps \| cryptoAssets \| cryptoEconomy \| cryptoForBeginners \| cryptoPortfolio \| cryptoWallet \| decentralization \| decentralizedWebWeb3 \| defiDecentralizedBorrowingLending \| defiDecentralizedTradingExchange \| defiEarn \| defiHow \| defiRisk \| didDecentralizedIdentity \| digitalCollectibles \| documentCertified \| documentSuccess \| earnInterest \| earnToLearn \| encryptedEverything \| estimatedAmount \| focusLimitOrders \| freeBtc \| gainsAndLosses \| gasFeesNetworkFees \| getStartedInMinutes \| hardwareWallets \| holdCrypto \| holdingCrypto \| insuranceProtection \| invest \| layeredNetworks \| layerThree \| linkingYourWalletToYourCoinbaseAccount \| mining \| moneyDecentralized \| multicoinSupport \| multiPlatformMobileAppBrowserExtension \| multipleAccountsWalletsForOneUser \| noFees \| notificationsAlt \| onTheList \| openEmail \| optInPushNotificationsEmail \| p2pPayments \| performance \| portfolioPerformance \| poweredByEthereum \| predictionsMarkets \| primeDeFi \| primeEarn \| primeStaking \| quickAndSimple \| readyToTrade \| retailUSDCRewards \| secureAndTrusted \| secureGlobalTransactions \| secureStorage \| selfCustody \| semiCustodial \| sendCryptoFaster \| shareOnSocialMedia \| sidechain \| stableValue \| stayInControlSelfHostedWalletsStorage \| stressTestedColdStorage \| switchAdvancedToSimpleTrading \| taxesDetails \| tradeImmediately \| trendingHotAssets \| verifyEmail \| verifyInfo \| walletNotifications \| walletSecurity \| watchVideos \| eth2SendSell \| ethStakeOrWrap \| ethStakeOrWrapTwo \| linkCoinbaseWallet \| addEth \| addMultipleCrypto \| addPasswordProtection \| announcementAdvancedTrading \| assetForward \| assetRefresh \| baseCautionMedium \| baseChartMedium \| baseCheckMedium \| baseCheckTrophyMedium \| baseCoinCryptoMedium \| baseCoinNetworkMedium \| baseConnectMedium \| baseDecentralizationMedium \| baseDiamondMedium \| baseEmptyMedium \| baseErrorButterflyMedium \| baseErrorMedium \| baseIdMedium \| baseLoadingMedium \| baseLocationMedium \| baseMintNftMedium \| baseNetworkMedium \| baseNftMedium \| basePaycoinMedium \| basePeopleMedium \| basePiechartMedium \| baseRewardChest \| baseRewardClam \| baseRewardPlate \| baseRewardPodium \| baseRewardSun \| baseRewardTrophyEmblem \| baseRewardTrophyStars \| baseSecurityMedium \| baseSendMedium \| baseSwitch \| baseTargetMedium \| baseUsdcMedium \| boostedCard \| borrowLimitsAddressed \| bullishCase \| cardAnnouncement \| cardAutoReload \| cardShipped \| cbEthWrappingUnavailable \| checkVerifacation \| coinbaseCardSparkle \| coinbaseLock \| coinbaseOneBoostedCard \| coinbaseOneBoostedCardCB1 \| coinbaseOneConcierge \| coinbaseOneStakeOrWrap \| coinbaseOneStaking \| coinbaseOneStarToken \| coinbaseOneUSDC \| coinbaseOneZero \| confirmAddress \| confirmEmail \| confirmIDCard \| confirmSocialSecurity \| cryptoEconomyArrows \| dappWallet \| darkModeIntroduction \| defiEarnAnnouncement \| defiNfts \| directDepositExcitement \| earnInterestOnCryptocurrency \| fileYourCryptoTaxesCheckOther \| fileYourCryptoTaxesOther \| frameEmpty \| giftBoxCrypto \| gifting \| guideBullCase \| guideCryptoBeginner \| guideFiveThings \| guideNftDefi \| guideStartInvesting \| interestForYou \| miniGift \| moneyRewards \| nftTag \| noPortfolio \| nuxChecklist \| nuxEarnCrypto \| nuxEarnYield \| nuxPopularAssets \| nuxRecurringBuys \| offersEmpty \| phoneNotifications \| pixBankDeposits \| pixDeposits \| recommendInvestments \| referralsPeople \| refreshMobileApp \| rewardExpiring \| saveTheDate \| sparkleToken \| starToken \| swapEth \| switchReward \| taxDocuments \| transferringCrypto \| unsupportedAsset \| waitlistSignup \| walletApp \| walletQuestsChest \| walletQuestsTrophy \| yieldCenter \| yieldCenterUSDC` | Yes | `-` | Name of illustration as defined in Figma |
|
|
42
|
+
| `dimension` | `96x96` | No | `-` | HeroSquare Default: 240x240 SpotSquare Default: 96x96 Pictogram Default: 48x48 SpotRectangle Default: 240x120 |
|
|
43
|
+
| `fallback` | `ReactElement<any, string \| JSXElementConstructor<any>> \| null` | No | `null` | Fallback element to render if unable to find an illustration with the matching name |
|
|
44
|
+
| `scaleMultiplier` | `number` | No | `-` | Multiply the width & height while maintaining aspect ratio |
|
|
45
|
+
| `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
|
|
46
|
+
|
|
47
|
+
|