@czi-sds/mcp 0.16.0 → 0.18.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/README.md +2 -1
- package/data/component-docs/Accordion.md +291 -0
- package/data/component-docs/Autocomplete.md +525 -0
- package/data/component-docs/Banner.md +231 -0
- package/data/component-docs/Button.md +224 -0
- package/data/component-docs/ButtonDropdown.md +256 -0
- package/data/component-docs/ButtonGroup.md +320 -0
- package/data/component-docs/ButtonToggle.md +397 -0
- package/data/component-docs/Callout.md +268 -0
- package/data/component-docs/CellBasic.md +122 -0
- package/data/component-docs/CellComponent.md +63 -0
- package/data/component-docs/CellHeader.md +128 -0
- package/data/component-docs/ComplexFilter.md +294 -0
- package/data/component-docs/ContentCard.md +406 -0
- package/data/component-docs/Dialog.md +651 -0
- package/data/component-docs/Dropdown.md +155 -0
- package/data/component-docs/DropdownMenu.md +949 -0
- package/data/component-docs/HeatmapChart.md +782 -0
- package/data/component-docs/Hero.md +363 -0
- package/data/component-docs/Icon.md +283 -0
- package/data/component-docs/InputCheckbox.md +205 -0
- package/data/component-docs/InputDropdown.md +482 -0
- package/data/component-docs/InputRadio.md +173 -0
- package/data/component-docs/InputSearch.md +81 -0
- package/data/component-docs/InputSlider.md +189 -0
- package/data/component-docs/InputText.md +110 -0
- package/data/component-docs/InputToggle.md +141 -0
- package/data/component-docs/IntentMessage.md +293 -0
- package/data/component-docs/Legend.md +442 -0
- package/data/component-docs/Link.md +23 -0
- package/data/component-docs/List.md +300 -0
- package/data/component-docs/LoadingIndicator.md +198 -0
- package/data/component-docs/Menu.md +298 -0
- package/data/component-docs/MenuItem.md +100 -0
- package/data/component-docs/NavigationFooter.md +165 -0
- package/data/component-docs/NavigationHeader.md +500 -0
- package/data/component-docs/NavigationJumpTo.md +414 -0
- package/data/component-docs/Notification.md +288 -0
- package/data/component-docs/Pagination.md +67 -0
- package/data/component-docs/Panel.md +636 -0
- package/data/component-docs/Popover.md +448 -0
- package/data/component-docs/PreComposedTable.md +2947 -0
- package/data/component-docs/ProteinStructureViewer.md +1044 -0
- package/data/component-docs/SegmentedControl.md +396 -0
- package/data/component-docs/StackedBarChart.md +475 -0
- package/data/component-docs/Table.md +2000 -0
- package/data/component-docs/TableHeader.md +53 -0
- package/data/component-docs/TableRow.md +74 -0
- package/data/component-docs/Tabs.md +455 -0
- package/data/component-docs/Tag.md +647 -0
- package/data/component-docs/TagFilter.md +131 -0
- package/data/component-docs/Tooltip.md +561 -0
- package/data/component-docs/TooltipCondensed.md +203 -0
- package/data/component-docs/TooltipTable.md +145 -0
- package/data/component-docs/index.json +267 -0
- package/data/component-list.json +2 -5
- package/data/component-props/Accordion.json +31 -11
- package/data/component-props/Alert.json +3 -3
- package/data/component-props/Autocomplete.json +150 -15
- package/data/component-props/Banner.json +31 -17
- package/data/component-props/Button.json +45 -20
- package/data/component-props/ButtonDropdown.json +36 -17
- package/data/component-props/ButtonDropdownLegacy.json +11 -11
- package/data/component-props/ButtonGroup.json +32 -11
- package/data/component-props/ButtonIcon.json +10 -10
- package/data/component-props/ButtonLegacy.json +19 -19
- package/data/component-props/ButtonToggle.json +32 -19
- package/data/component-props/ButtonToggleLegacy.json +11 -11
- package/data/component-props/Callout.json +58 -17
- package/data/component-props/CellBasic.json +94 -41
- package/data/component-props/CellComponent.json +23 -7
- package/data/component-props/CellHeader.json +62 -19
- package/data/component-props/ComplexFilter.json +52 -21
- package/data/component-props/ContentCard.json +70 -47
- package/data/component-props/Dialog.json +47 -14
- package/data/component-props/Dropdown.json +68 -31
- package/data/component-props/DropdownMenu.json +128 -23
- package/data/component-props/HeatmapChart.json +88 -12
- package/data/component-props/Hero.json +80 -39
- package/data/component-props/Icon.json +20 -9
- package/data/component-props/InputCheckbox.json +36 -14
- package/data/component-props/InputDropdown.json +75 -27
- package/data/component-props/InputRadio.json +31 -13
- package/data/component-props/InputSearch.json +41 -18
- package/data/component-props/InputSlider.json +46 -19
- package/data/component-props/InputText.json +26 -19
- package/data/component-props/InputToggle.json +26 -9
- package/data/component-props/IntentMessage.json +38 -9
- package/data/component-props/Link.json +13 -7
- package/data/component-props/LoadingIndicator.json +11 -3
- package/data/component-props/MenuItem.json +38 -19
- package/data/component-props/MenuSelect.json +8 -8
- package/data/component-props/NavigationFooter.json +49 -19
- package/data/component-props/NavigationHeader.json +150 -37
- package/data/component-props/NavigationJumpTo.json +33 -7
- package/data/component-props/Notification.json +39 -21
- package/data/component-props/Pagination.json +39 -11
- package/data/component-props/Panel.json +62 -9
- package/data/component-props/Popover.json +80 -7
- package/data/component-props/PreComposedTable.json +99 -27
- package/data/component-props/ProteinStructureViewer.json +117 -0
- package/data/component-props/SegmentedControl.json +42 -3
- package/data/component-props/StackedBarChart.json +116 -42
- package/data/component-props/TableRow.json +38 -19
- package/data/component-props/Tabs.json +66 -9
- package/data/component-props/Tag.json +34 -17
- package/data/component-props/TagFilter.json +10 -3
- package/data/component-props/Tooltip.json +49 -18
- package/data/component-props/TooltipCondensed.json +18 -9
- package/data/component-props/TooltipTable.json +17 -7
- package/data/resources/{zeroheight-rules.md → documentation-rules.md} +43 -30
- package/data/resources/figma-rules.md +2 -2
- package/data/tailwind.json +20 -14
- package/dist/stdio.js +112 -208
- package/package.json +9 -5
- package/data/component-props/ButtonDropdownV2.json +0 -34
- package/data/component-props/ButtonNew.json +0 -47
- package/data/component-props/ButtonToggleV2.json +0 -44
- package/data/component-props/ButtonV2.json +0 -43
- package/data/zeroheight-cache.json +0 -10259
- package/data/zeroheight-exports/Accordion.md +0 -774
- package/data/zeroheight-exports/Banner.md +0 -691
- package/data/zeroheight-exports/Borders.md +0 -117
- package/data/zeroheight-exports/Buttons.md +0 -1854
- package/data/zeroheight-exports/Callout.md +0 -931
- package/data/zeroheight-exports/Colors.md +0 -1755
- package/data/zeroheight-exports/Content-Card.md +0 -309
- package/data/zeroheight-exports/Contributing-to-SDS.md +0 -98
- package/data/zeroheight-exports/Control-Inputs.md +0 -2818
- package/data/zeroheight-exports/Corners.md +0 -104
- package/data/zeroheight-exports/Cover-page.md +0 -3
- package/data/zeroheight-exports/Dialog.md +0 -1367
- package/data/zeroheight-exports/Downloads.md +0 -236
- package/data/zeroheight-exports/Drop-Shadows.md +0 -79
- package/data/zeroheight-exports/Dropdown-Input.md +0 -1776
- package/data/zeroheight-exports/Dropdown-Menus.md +0 -913
- package/data/zeroheight-exports/Element-Status-Tracker.md +0 -267
- package/data/zeroheight-exports/Field-Inputs.md +0 -1405
- package/data/zeroheight-exports/Filters.md +0 -1111
- package/data/zeroheight-exports/Getting-Started.md +0 -1157
- package/data/zeroheight-exports/Hero.md +0 -414
- package/data/zeroheight-exports/Icons.md +0 -2067
- package/data/zeroheight-exports/Intent.md +0 -86
- package/data/zeroheight-exports/Introduction-to-Bases.md +0 -35
- package/data/zeroheight-exports/Introduction-to-Cells.md +0 -35
- package/data/zeroheight-exports/Introduction-to-DNA.md +0 -35
- package/data/zeroheight-exports/Introduction-to-Genes.md +0 -35
- package/data/zeroheight-exports/Introduction.md +0 -115
- package/data/zeroheight-exports/Link.md +0 -432
- package/data/zeroheight-exports/Lists.md +0 -986
- package/data/zeroheight-exports/Loading-Indicator.md +0 -41
- package/data/zeroheight-exports/Navigation.md +0 -1190
- package/data/zeroheight-exports/Notification.md +0 -1038
- package/data/zeroheight-exports/Panel.md +0 -1030
- package/data/zeroheight-exports/README.md +0 -122
- package/data/zeroheight-exports/Responsive-Design.md +0 -330
- package/data/zeroheight-exports/Search-Input.md +0 -91
- package/data/zeroheight-exports/Search.md +0 -822
- package/data/zeroheight-exports/Segmented-Control.md +0 -609
- package/data/zeroheight-exports/Spacing.md +0 -297
- package/data/zeroheight-exports/Table.md +0 -5345
- package/data/zeroheight-exports/Tabs.md +0 -1324
- package/data/zeroheight-exports/Tags.md +0 -1545
- package/data/zeroheight-exports/Text-Link.md +0 -268
- package/data/zeroheight-exports/Theming.md +0 -362
- package/data/zeroheight-exports/Tooltips.md +0 -2015
- package/data/zeroheight-exports/Typography.md +0 -800
|
@@ -1,414 +0,0 @@
|
|
|
1
|
-
# Hero
|
|
2
|
-
|
|
3
|
-
Hero is located at the top of the page above all other content and features key information and visuals which can include images or videos, headlines, and calls-to-action including Buttons and Links.
|
|
4
|
-
|
|
5
|
-
## Guidelines
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
| | In Figma | | | Meets Accessibility | | | In Code |
|
|
10
|
-
| --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
|
|
11
|
-
|
|
12
|
-
The Hero component was designed to support a wide range of potential product needs, giving teams flexibility to implement content in their applications as desired. Teams can fill the background with their visual of choice (image, video, color, gradient, etc.), overlay any combination of elements (text, image, buttons, links, etc.) on top of their chosen background, as well as turn on a darkening mask to make text easier to read and / or a darkening vignette positioned at the top of the container to make the transition from Header Navigation to Hero visually smooth.
|
|
13
|
-
|
|
14
|
-
Hero has been built to ensure any overlay elements (text, images, videos, etc.) are constrained to a content area that is centered on the page; this is especially necessary when viewed on wide screens. Overlay elements can be freely arranged within this content area. The `max-width` of this area and its left and right padding are dictated by Breakpoint. When displayed at Small and Medium Breakpoints, the `max-width` of the content area is `100%` of the screen width with left and right padding of `24px` on Small Breakpoints and `40px` on Medium Breakpoints.
|
|
15
|
-
|
|
16
|
-
When displayed at Large Breakpoints, the content area has a `max-width` of `1024px` and left and right padding of `120px`. This means that the width of the content area will be dictated by the width of the screen minus the left and right padding of `120px` up until that value is greater than `1024px`. Once the width of the screen goes beyond that value, the viewable area will be set at `1024px`.
|
|
17
|
-
|
|
18
|
-
For example: if the screen is `1200px` wide, the width of the content area would be `960px` (`1200px-120px-120px = 960px`). If, however, the screen is `1500px` wide, the width of the content area would max out and be `1024px` (`1500px-120px-120px = 1260px`) since `1260px` is larger than `1024px`, and thus a `width` of `1024px` would be used for the content area. This ensures that, even when viewed on extra wide displays, the overlay content will always be viewable by users.
|
|
19
|
-
|
|
20
|
-
| Breakpoint: Large | Breakpoint: Medium | Breakpoint: Small |
|
|
21
|
-
| ----------------- | ------------------ | ----------------- |
|
|
22
|
-
|
|
23
|
-
**Preview_Guidelines_Hero_large**
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
**Preview_Guidelines_Hero_medium**
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
**Preview_Guidelines_Hero_small**
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
#### Background Fill Options
|
|
36
|
-
|
|
37
|
-
The Hero component background can be filled with any CSS color, including gradients, or any type of media such as images, videos, GIFs, etc.
|
|
38
|
-
|
|
39
|
-
| Color | Media |
|
|
40
|
-
| ----- | ----- |
|
|
41
|
-
|
|
42
|
-
**Hero_background_color**
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
**Hero_background_image**
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
#### Darkening Mask
|
|
51
|
-
|
|
52
|
-
The darkening mask is an overlay element used to subtly dim the Hero's background, thereby enhancing the visibility and focus on the overlay elements; the mask's opacity can be set by the team implementing it.
|
|
53
|
-
|
|
54
|
-
| Disabled | Enabled |
|
|
55
|
-
| -------- | ------- |
|
|
56
|
-
|
|
57
|
-
**Hero_darkening mask_false**
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
**Hero_darkening mask_true**
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
#### Darkening Vignette
|
|
66
|
-
|
|
67
|
-
The darkening vignette is an overlay element positioned at the top of Hero that subtly fades from solid to transparent, smoothing the transition from the Header Navigation to the Hero background.
|
|
68
|
-
|
|
69
|
-
| Disabled | Enabled |
|
|
70
|
-
| -------- | ------- |
|
|
71
|
-
|
|
72
|
-
**Hero_darkening vignette_false**
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
**Hero_darkening vignette_true**
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
#### Overlay Content Visibility
|
|
81
|
-
|
|
82
|
-
Overlay content elements (title text, caption text, and content slot) can be used or not depending on teams' needs; the examples below show one element hidden at a time to demonstrate, but any combination of elements can be used.
|
|
83
|
-
|
|
84
|
-
| All elements displayed | Title hidden | Caption hidden | Content slot hidden |
|
|
85
|
-
| ---------------------- | ------------ | -------------- | ------------------- |
|
|
86
|
-
|
|
87
|
-
**Hero_overlay content_options_all visible**
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
**Hero_overlay content_options_no title**
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
**Hero_overlay content_options_no caption**
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
**Hero_overlay content_options_no slot**
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
#### Text Alignment Options
|
|
104
|
-
|
|
105
|
-
Alignment settings apply to both title and caption text.
|
|
106
|
-
|
|
107
|
-
| Left-aligned | Center-aligned | Right-aligned |
|
|
108
|
-
| ------------ | -------------- | ------------- |
|
|
109
|
-
|
|
110
|
-
**Hero_overlay text_alignment_left-aligned**
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
**Hero_overlay text_alignment_center-aligned**
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
**Hero_overlay text_alignment_right-aligned**
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
#### Overlay Content Position
|
|
123
|
-
|
|
124
|
-
| Top-left | Top | Top-right |
|
|
125
|
-
| -------- | --- | --------- |
|
|
126
|
-
|
|
127
|
-
**Hero_overlay content_position_top-left**
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
**Hero_overlay content_position_top**
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
**Hero_overlay content_position_top-right**
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
| Left | Center | Right |
|
|
140
|
-
| ---- | ------ | ----- |
|
|
141
|
-
|
|
142
|
-
**Hero_overlay content_position_left**
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
**Hero_overlay content_position_center**
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
**Hero_overlay content_position_right**
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
| Bottom-left | Bottom | Bottom-right |
|
|
155
|
-
| ----------- | ------ | ------------ |
|
|
156
|
-
|
|
157
|
-
**Hero_overlay content_position_bottom-left**
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
**Hero_overlay content_position_bottom**
|
|
162
|
-
|
|
163
|
-
---
|
|
164
|
-
|
|
165
|
-
**Hero_overlay content_position_bottom-right**
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
#### Overlay Media Options
|
|
170
|
-
|
|
171
|
-
In addition to overlay content, media (images, videos, GIFs, etc.) can be optionally overlayed on top of the Hero component's background; it can take whatever size or shape teams need.
|
|
172
|
-
|
|
173
|
-
| Overlay media hidden | Overlay media displayed | Larger overlay media | Smaller overlay media |
|
|
174
|
-
| -------------------- | ----------------------- | -------------------- | --------------------- |
|
|
175
|
-
|
|
176
|
-
**Hero_overlay image_false**
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
**Hero_overlay image_true**
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
**Hero_overlay image_true_larger**
|
|
185
|
-
|
|
186
|
-
---
|
|
187
|
-
|
|
188
|
-
**Hero_overlay image_true_smaller**
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
#### Overlay Media Position
|
|
193
|
-
|
|
194
|
-
| Top-left | Top | Top-right |
|
|
195
|
-
| -------- | --- | --------- |
|
|
196
|
-
|
|
197
|
-
**Hero_overlay image_position_top-left**
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
**Hero_overlay image_position_top**
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
**Hero_overlay image_position_top-right**
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
| Left | Center | Right |
|
|
210
|
-
| ---- | ------ | ----- |
|
|
211
|
-
|
|
212
|
-
**Hero_overlay image_position_left**
|
|
213
|
-
|
|
214
|
-
---
|
|
215
|
-
|
|
216
|
-
**Hero_overlay image_position_center**
|
|
217
|
-
|
|
218
|
-
---
|
|
219
|
-
|
|
220
|
-
**Hero_overlay image_position_right**
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
| Bottom-left | Bottom | Bottom-right |
|
|
225
|
-
| ----------- | ------ | ------------ |
|
|
226
|
-
|
|
227
|
-
**Hero_overlay image_position_bottom-left**
|
|
228
|
-
|
|
229
|
-
---
|
|
230
|
-
|
|
231
|
-
**Hero_overlay image_position_bottom**
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
**Hero_overlay image_position_bottom-right**
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
## Code
|
|
240
|
-
|
|
241
|
-
> **Note:** Code details coming soon
|
|
242
|
-
|
|
243
|
-
> **Note:** The code examples below must install dependencies before displaying and may take extra time to load
|
|
244
|
-
|
|
245
|
-
## Hero
|
|
246
|
-
|
|
247
|
-
### SDS Source Code
|
|
248
|
-
|
|
249
|
-
The component's source code in the SDS codebase can be found here.
|
|
250
|
-
|
|
251
|
-
### SDS vs MUI
|
|
252
|
-
|
|
253
|
-
[update this section]
|
|
254
|
-
|
|
255
|
-
### MUI Documentation
|
|
256
|
-
|
|
257
|
-
Documentation for the underlying MUI `[update]` component can be found here.
|
|
258
|
-
|
|
259
|
-
### Props
|
|
260
|
-
|
|
261
|
-
Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
|
|
262
|
-
|
|
263
|
-
| Name | Type | Default | Description |
|
|
264
|
-
| ---- | ---- | ------- | ----------- |
|
|
265
|
-
| | | | |
|
|
266
|
-
| | | | |
|
|
267
|
-
| | | | |
|
|
268
|
-
|
|
269
|
-
### Code examples
|
|
270
|
-
|
|
271
|
-
**/styles.css**
|
|
272
|
-
|
|
273
|
-
```css
|
|
274
|
-
body {
|
|
275
|
-
font-size: 13px;
|
|
276
|
-
font-weight: 400;
|
|
277
|
-
letter-spacing: 0.08px;
|
|
278
|
-
line-height: 20px;
|
|
279
|
-
text-transform: none;
|
|
280
|
-
font-family: "Inter", sans-serif;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
h1 {
|
|
284
|
-
font-size: 1.5rem;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.app {
|
|
288
|
-
padding: 20px;
|
|
289
|
-
}
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
**tsconfig.json**
|
|
293
|
-
|
|
294
|
-
```json
|
|
295
|
-
{
|
|
296
|
-
"include": ["./**/*"],
|
|
297
|
-
"compilerOptions": {
|
|
298
|
-
"strict": true,
|
|
299
|
-
"esModuleInterop": true,
|
|
300
|
-
"lib": ["dom", "es2015"],
|
|
301
|
-
"jsx": "react-jsx"
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
**/App.tsx**
|
|
307
|
-
|
|
308
|
-
```tsx
|
|
309
|
-
// Most minimal Callout (just has the basic requirements)
|
|
310
|
-
|
|
311
|
-
import { Callout, CalloutTitle } from "@czi-sds/components";
|
|
312
|
-
import "./styles.css";
|
|
313
|
-
|
|
314
|
-
function App() {
|
|
315
|
-
return (
|
|
316
|
-
<div className="app">
|
|
317
|
-
<Callout intent="info">
|
|
318
|
-
<CalloutTitle>Callout box</CalloutTitle>
|
|
319
|
-
The Callout Box component is a versatile UI element designed to draw
|
|
320
|
-
attention to important information or messages within your interface.
|
|
321
|
-
With its clean and elegant design, the Callout Box helps highlight key
|
|
322
|
-
content, alerts, or contextual details.
|
|
323
|
-
</Callout>
|
|
324
|
-
</div>
|
|
325
|
-
);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
export default App;
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
**/index.tsx**
|
|
332
|
-
|
|
333
|
-
```tsx
|
|
334
|
-
import React from "react";
|
|
335
|
-
import { createRoot } from "react-dom/client";
|
|
336
|
-
import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
|
|
337
|
-
import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
|
|
338
|
-
import { Theme } from "@czi-sds/components";
|
|
339
|
-
import CssBaseline from "@mui/material/CssBaseline";
|
|
340
|
-
import useMediaQuery from "@mui/material/useMediaQuery";
|
|
341
|
-
|
|
342
|
-
import App from "./App";
|
|
343
|
-
|
|
344
|
-
const container = document.getElementById("root");
|
|
345
|
-
const root = createRoot(container!);
|
|
346
|
-
|
|
347
|
-
const RootApp = () => {
|
|
348
|
-
const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
|
|
349
|
-
const theme = prefersDarkMode ? Theme("dark") : Theme("light");
|
|
350
|
-
|
|
351
|
-
return (
|
|
352
|
-
<StyledEngineProvider injectFirst>
|
|
353
|
-
<ThemeProvider theme={theme}>
|
|
354
|
-
<EmotionThemeProvider theme={theme}>
|
|
355
|
-
<CssBaseline />
|
|
356
|
-
<App />
|
|
357
|
-
</EmotionThemeProvider>
|
|
358
|
-
</ThemeProvider>
|
|
359
|
-
</StyledEngineProvider>
|
|
360
|
-
);
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
root.render(
|
|
364
|
-
<React.StrictMode>
|
|
365
|
-
<RootApp />
|
|
366
|
-
</React.StrictMode>
|
|
367
|
-
);
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
**/public/index.html**
|
|
371
|
-
|
|
372
|
-
```html
|
|
373
|
-
<!doctype html>
|
|
374
|
-
<html lang="en">
|
|
375
|
-
<head>
|
|
376
|
-
<meta charset="UTF-8" />
|
|
377
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
378
|
-
<title>Callout</title>
|
|
379
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
380
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
381
|
-
<link
|
|
382
|
-
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
|
|
383
|
-
rel="stylesheet"
|
|
384
|
-
/>
|
|
385
|
-
<link
|
|
386
|
-
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
|
|
387
|
-
rel="stylesheet"
|
|
388
|
-
/>
|
|
389
|
-
</head>
|
|
390
|
-
<body>
|
|
391
|
-
<div id="root"></div>
|
|
392
|
-
</body>
|
|
393
|
-
</html>
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
**/package.json**
|
|
397
|
-
|
|
398
|
-
```json
|
|
399
|
-
{
|
|
400
|
-
"dependencies": {
|
|
401
|
-
"react": "^18.0.0",
|
|
402
|
-
"react-dom": "^18.0.0",
|
|
403
|
-
"react-scripts": "^4.0.0"
|
|
404
|
-
},
|
|
405
|
-
"devDependencies": {
|
|
406
|
-
"@types/react": "^18.0.0",
|
|
407
|
-
"@types/react-dom": "^18.0.0",
|
|
408
|
-
"typescript": "^4.0.0"
|
|
409
|
-
},
|
|
410
|
-
"main": "/index.tsx"
|
|
411
|
-
}
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
---
|