@tempoxyz/ds 0.3.9 → 0.3.11
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/dist/docs/AGENTS.md +9 -0
- package/dist/docs/components/accordion.md +489 -0
- package/dist/docs/components/address-card.md +147 -0
- package/dist/docs/components/agent-logo.md +194 -0
- package/dist/docs/components/alert-dialog.md +631 -0
- package/dist/docs/components/alert.md +448 -0
- package/dist/docs/components/amount-input.md +305 -0
- package/dist/docs/components/amount.md +794 -0
- package/dist/docs/components/app-shell.md +559 -0
- package/dist/docs/components/asset-chip.md +294 -0
- package/dist/docs/components/autocomplete.md +619 -0
- package/dist/docs/components/avatar.md +321 -0
- package/dist/docs/components/badge.md +339 -0
- package/dist/docs/components/badged-logo.md +116 -0
- package/dist/docs/components/banner.md +379 -0
- package/dist/docs/components/bar-chart.md +208 -0
- package/dist/docs/components/breadcrumbs.md +380 -0
- package/dist/docs/components/button-group.md +286 -0
- package/dist/docs/components/button.md +650 -0
- package/dist/docs/components/calendar.md +375 -0
- package/dist/docs/components/callout.md +96 -0
- package/dist/docs/components/checkbox-group.md +521 -0
- package/dist/docs/components/checkbox.md +467 -0
- package/dist/docs/components/choice-group.md +516 -0
- package/dist/docs/components/choicebox.md +641 -0
- package/dist/docs/components/code.md +100 -0
- package/dist/docs/components/combobox.md +939 -0
- package/dist/docs/components/container.md +257 -0
- package/dist/docs/components/copy-button.md +642 -0
- package/dist/docs/components/date-picker.md +514 -0
- package/dist/docs/components/dialog.md +1332 -0
- package/dist/docs/components/drawer.md +966 -0
- package/dist/docs/components/empty.md +340 -0
- package/dist/docs/components/field.md +570 -0
- package/dist/docs/components/fieldset.md +398 -0
- package/dist/docs/components/frame.md +434 -0
- package/dist/docs/components/gauge.md +299 -0
- package/dist/docs/components/get-started-visual.md +117 -0
- package/dist/docs/components/grid.md +288 -0
- package/dist/docs/components/hero-visual.md +155 -0
- package/dist/docs/components/hex.md +487 -0
- package/dist/docs/components/icon-tile.md +292 -0
- package/dist/docs/components/identicon.md +371 -0
- package/dist/docs/components/inline.md +233 -0
- package/dist/docs/components/inset.md +225 -0
- package/dist/docs/components/kbd.md +423 -0
- package/dist/docs/components/list-group.md +981 -0
- package/dist/docs/components/loading-dots.md +237 -0
- package/dist/docs/components/menu.md +934 -0
- package/dist/docs/components/native-select.md +204 -0
- package/dist/docs/components/network-logo.md +248 -0
- package/dist/docs/components/number-field.md +543 -0
- package/dist/docs/components/otp-field.md +616 -0
- package/dist/docs/components/pagination.md +516 -0
- package/dist/docs/components/popover.md +544 -0
- package/dist/docs/components/progress.md +388 -0
- package/dist/docs/components/qr.md +314 -0
- package/dist/docs/components/radio-group.md +528 -0
- package/dist/docs/components/secret-value.md +406 -0
- package/dist/docs/components/select.md +751 -0
- package/dist/docs/components/separator.md +379 -0
- package/dist/docs/components/sidebar-menu.md +922 -0
- package/dist/docs/components/skeleton.md +517 -0
- package/dist/docs/components/slider.md +539 -0
- package/dist/docs/components/snippet.md +424 -0
- package/dist/docs/components/spinner.md +216 -0
- package/dist/docs/components/split-bar.md +139 -0
- package/dist/docs/components/split-button.md +464 -0
- package/dist/docs/components/stack.md +299 -0
- package/dist/docs/components/status-chip.md +226 -0
- package/dist/docs/components/status-indicator.md +119 -0
- package/dist/docs/components/status-row.md +174 -0
- package/dist/docs/components/stepper.md +451 -0
- package/dist/docs/components/success-hero.md +157 -0
- package/dist/docs/components/surface.md +639 -0
- package/dist/docs/components/switch.md +472 -0
- package/dist/docs/components/table.md +967 -0
- package/dist/docs/components/tabs.md +627 -0
- package/dist/docs/components/tempo-logo.md +185 -0
- package/dist/docs/components/text-input.md +624 -0
- package/dist/docs/components/textarea.md +352 -0
- package/dist/docs/components/toast.md +535 -0
- package/dist/docs/components/token-logo.md +371 -0
- package/dist/docs/components/token.md +247 -0
- package/dist/docs/components/tooltip.md +490 -0
- package/dist/docs/components/verification-code.md +116 -0
- package/dist/docs/components/visual.md +249 -0
- package/dist/docs/components.md +203 -0
- package/dist/docs/foundations/accessibility.md +377 -0
- package/dist/docs/foundations/agents.md +150 -0
- package/dist/docs/foundations/color.md +522 -0
- package/dist/docs/foundations/content/tone.md +194 -0
- package/dist/docs/foundations/content/voice.md +194 -0
- package/dist/docs/foundations/content/writing-style.md +406 -0
- package/dist/docs/foundations/iconography.md +282 -0
- package/dist/docs/foundations/intent.md +360 -0
- package/dist/docs/foundations/layout.md +508 -0
- package/dist/docs/foundations/linter.md +296 -0
- package/dist/docs/foundations/motion.md +151 -0
- package/dist/docs/foundations/radius-and-padding.md +86 -0
- package/dist/docs/foundations/typography.md +266 -0
- package/dist/docs/index.md +137 -0
- package/dist/docs/introduction/faq.md +132 -0
- package/dist/docs/introduction/getting-started.md +377 -0
- package/dist/docs/patterns/blockchain-values.md +709 -0
- package/dist/docs/patterns/dashboards.md +638 -0
- package/dist/docs/patterns/destructive-actions.md +626 -0
- package/dist/docs/patterns/empty-states.md +612 -0
- package/dist/docs/patterns/errors-and-validation.md +808 -0
- package/dist/docs/patterns/feedback-and-status.md +518 -0
- package/dist/docs/patterns/forms.md +679 -0
- package/dist/docs/patterns/loading.md +630 -0
- package/dist/docs/patterns/navigation.md +397 -0
- package/dist/docs/patterns/payments.md +765 -0
- package/dist/docs/patterns/responsive-layout.md +997 -0
- package/dist/docs/patterns/tables-and-lists.md +964 -0
- package/dist/docs/products/tempo-console.md +671 -0
- package/dist/docs/products/tempo-performance.md +437 -0
- package/dist/docs/products/tempo-wallet.md +438 -0
- package/dist/web/components/OtpField.css +1 -1
- package/dist/web/components/OtpField.d.ts +1 -1
- package/dist/web/components/OtpField.d.ts.map +1 -1
- package/dist/web/components/OtpField.js +3 -4
- package/dist/web/components/OtpField.js.map +1 -1
- package/dist/web/components/OtpField.js.zyzz.json +1 -1
- package/dist/web/index.js.zyzz.json +1 -1
- package/package.json +1 -1
- package/src/web/components/OtpField.tsx +2 -24
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# Tone
|
|
2
|
+
|
|
3
|
+
How Tempo's voice adjusts to the reader, from a first visit to an error.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
[Voice](/docs/foundations/content/voice) stays the same everywhere. Tone shifts with what the reader is doing and how they feel, and grows plainer and more specific as more money or access is at stake.
|
|
8
|
+
|
|
9
|
+
## Situations
|
|
10
|
+
|
|
11
|
+
### Onboarding
|
|
12
|
+
|
|
13
|
+
Welcome a new reader, and explain each new term once, in one sentence.
|
|
14
|
+
|
|
15
|
+
**Do:** Explain the first step and why it matters.
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<Empty.Root>
|
|
19
|
+
<Empty.Icon>
|
|
20
|
+
<Wallet />
|
|
21
|
+
</Empty.Icon>
|
|
22
|
+
<Empty.Title>Add funds to start</Empty.Title>
|
|
23
|
+
<Empty.Description>Deposit dollars or stablecoins to send your first payment.</Empty.Description>
|
|
24
|
+
<Empty.Actions>
|
|
25
|
+
<Button size="small">Add funds</Button>
|
|
26
|
+
</Empty.Actions>
|
|
27
|
+
</Empty.Root>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Don't:** Assume crypto vocabulary.
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
<Empty.Root>
|
|
34
|
+
<Empty.Icon>
|
|
35
|
+
<Wallet />
|
|
36
|
+
</Empty.Icon>
|
|
37
|
+
<Empty.Title>Bridge assets</Empty.Title>
|
|
38
|
+
<Empty.Description>Bridge ERC-20s to the L1 to bootstrap liquidity.</Empty.Description>
|
|
39
|
+
</Empty.Root>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Success
|
|
43
|
+
|
|
44
|
+
State what finished in a positive [Toast](/docs/components/toast) when nothing is left to do, then stop.
|
|
45
|
+
|
|
46
|
+
* **Name the Result:** Use a noun and a past-tense verb.
|
|
47
|
+
* **Add the Detail:** Add the amount or recipient as confirmation.
|
|
48
|
+
* **Skip the Celebration:** Leave out praise, exclamation marks, and emoji.
|
|
49
|
+
* **Wait for the Network:** Show a pending state until the network confirms.
|
|
50
|
+
|
|
51
|
+
### In Progress
|
|
52
|
+
|
|
53
|
+
Be calm and specific about what happens next and how long it takes.
|
|
54
|
+
|
|
55
|
+
* **Name the Step:** End a status label with an ellipsis (…).
|
|
56
|
+
* **Explain Long Waits:** Name the wait, and whether to stay on the page.
|
|
57
|
+
|
|
58
|
+
**Do:** State what the system does and set an expectation.
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
<Progress.Root value={60}>
|
|
62
|
+
<Progress.Label>Confirming payment</Progress.Label>
|
|
63
|
+
<Progress.Track>
|
|
64
|
+
<Progress.Indicator />
|
|
65
|
+
</Progress.Track>
|
|
66
|
+
</Progress.Root>
|
|
67
|
+
<p>This usually takes less than a second.</p>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Don't:** Leave the reader with an open-ended wait.
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
<Spinner />
|
|
74
|
+
<p>Please wait…</p>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Warnings
|
|
78
|
+
|
|
79
|
+
State a risk once, beside the content it affects, and only if the reader can act on it.
|
|
80
|
+
|
|
81
|
+
**Do:** State the risk and what to check in one or two plain sentences.
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
/**
|
|
85
|
+
* Do example for "Warnings" on the Tone page.
|
|
86
|
+
* State the risk and what to check in one or two plain sentences.
|
|
87
|
+
* @module
|
|
88
|
+
*/
|
|
89
|
+
import { Alert, style } from '@tempoxyz/ds'
|
|
90
|
+
|
|
91
|
+
/** Renders the static preview, which the guideline card shows inert. */
|
|
92
|
+
export function Demo() {
|
|
93
|
+
return (
|
|
94
|
+
<Alert intent="warning" {...styles.alert()}>
|
|
95
|
+
<Alert.Icon />
|
|
96
|
+
<Alert.Content>
|
|
97
|
+
Payments are final. Check that the address matches the one you were given.
|
|
98
|
+
</Alert.Content>
|
|
99
|
+
</Alert>
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
namespace styles {
|
|
104
|
+
export const alert = style({ maxWidth: '20rem !custom' })
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Don't:** Shout, stack exclamation marks, or use the `negative` intent for a warning.
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
/**
|
|
112
|
+
* Don't example for "Warnings" on the Tone page.
|
|
113
|
+
* Don't shout, stack exclamation marks, or use the `negative` intent for a warning.
|
|
114
|
+
* @module
|
|
115
|
+
*/
|
|
116
|
+
import { Alert, style } from '@tempoxyz/ds'
|
|
117
|
+
|
|
118
|
+
/** Renders the static preview, which the guideline card shows inert. */
|
|
119
|
+
export function Demo() {
|
|
120
|
+
return (
|
|
121
|
+
<Alert intent="negative" {...styles.alert()}>
|
|
122
|
+
<Alert.Icon />
|
|
123
|
+
<Alert.Content>
|
|
124
|
+
WARNING!! Double-check everything or your money is GONE forever!
|
|
125
|
+
</Alert.Content>
|
|
126
|
+
</Alert>
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
namespace styles {
|
|
131
|
+
export const alert = style({ maxWidth: '20rem !custom' })
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
* **Local Risk (Alert):** Use a warning [Alert](/docs/components/alert) for a field or section.
|
|
136
|
+
* **Product-Wide Condition (Banner):** Use a warning [Banner](/docs/components/banner) for the whole product.
|
|
137
|
+
|
|
138
|
+
### Errors
|
|
139
|
+
|
|
140
|
+
Stay neutral and direct, and follow the [error message structure](/docs/foundations/content/writing-style#structure-error-messages).
|
|
141
|
+
|
|
142
|
+
* **Lead With the Fix:** Add the cause only if it helps the reader act.
|
|
143
|
+
* **Show It Inline:** Show a blocking error inline, not in a [Toast](/docs/components/toast).
|
|
144
|
+
* **Keep the TextInput:** Keep the input, and state what to change.
|
|
145
|
+
* **Skip Blame and Jokes:** Don't apologize at length, blame, or joke.
|
|
146
|
+
|
|
147
|
+
### Security and Keys
|
|
148
|
+
|
|
149
|
+
**Do:** State the exact consequence and who is responsible.
|
|
150
|
+
|
|
151
|
+
```tsx
|
|
152
|
+
<Empty.Root>
|
|
153
|
+
<Empty.Icon>
|
|
154
|
+
<Key />
|
|
155
|
+
</Empty.Icon>
|
|
156
|
+
<Empty.Title>Save your recovery key</Empty.Title>
|
|
157
|
+
<Empty.Description>Anyone with this key can move your funds. Tempo cannot recover it for you.</Empty.Description>
|
|
158
|
+
</Empty.Root>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Don't:** Use humor for a security step.
|
|
162
|
+
|
|
163
|
+
```tsx
|
|
164
|
+
<Empty.Root>
|
|
165
|
+
<Empty.Icon>
|
|
166
|
+
<Key />
|
|
167
|
+
</Empty.Icon>
|
|
168
|
+
<Empty.Title>Your secret sauce 🤫</Empty.Title>
|
|
169
|
+
<Empty.Description>Keep it somewhere safe-ish!</Empty.Description>
|
|
170
|
+
</Empty.Root>
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Sending Money
|
|
174
|
+
|
|
175
|
+
Repeat the exact amount, recipient, and fee on every step.
|
|
176
|
+
|
|
177
|
+
**Do:** Put the exact amount on the final action.
|
|
178
|
+
|
|
179
|
+
```tsx
|
|
180
|
+
<Button><Send />Send 25.00 USDC</Button>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**Don't:** Use a playful label for a payment.
|
|
184
|
+
|
|
185
|
+
```tsx
|
|
186
|
+
<Button>Let's go</Button>
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Irreversible Actions
|
|
190
|
+
|
|
191
|
+
Use a serious, explicit tone, as [Destructive Actions](/docs/patterns/destructive-actions) shows.
|
|
192
|
+
|
|
193
|
+
* **Name the Consequence:** Name exactly what the action removes or ends.
|
|
194
|
+
* **Confirm Payments on Review:** On review, state once that payments are final.
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# Voice
|
|
2
|
+
|
|
3
|
+
Tempo's personality in words, consistent across every product.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Voice is how Tempo sounds in every product: a knowledgeable colleague who explains plainly and wastes no time, as on [tempo.xyz](https://tempo.xyz) and in the [developer docs](https://tempo.xyz/developers). [Tone](/docs/foundations/content/tone) adapts it to each situation, such as a first visit or a failed payment.
|
|
8
|
+
|
|
9
|
+
## How Tempo Writes
|
|
10
|
+
|
|
11
|
+
* **Cover Three Points:** State what is happening, what it costs, and what happens next.
|
|
12
|
+
* **Define Before Explaining:** Open with one sentence that defines the thing, then list its parts.
|
|
13
|
+
* **State Rules as Facts:** State limits and protections as what Tempo enforces, not as warnings.
|
|
14
|
+
* **Name Availability Plainly (Testnet only):** Name a stage, such as beta or devnet only, with where it applies and what changes it.
|
|
15
|
+
* **State What an Operation Doesn't Do:** State plainly that a refund is a new payment, not a reversal.
|
|
16
|
+
|
|
17
|
+
## Traits
|
|
18
|
+
|
|
19
|
+
Each trait names the line it must not cross.
|
|
20
|
+
|
|
21
|
+
### Clear, Not Simplistic
|
|
22
|
+
|
|
23
|
+
**Do:** Describe a payment in everyday money words, and format each value with
|
|
24
|
+
[Amount](/docs/components/amount) or [Hex](/docs/components/hex).
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
/**
|
|
28
|
+
* Do example for "Clear, Not Simplistic" on the Voice page.
|
|
29
|
+
* Describe a payment in everyday money words, and format each value with Amount or Hex.
|
|
30
|
+
* @module
|
|
31
|
+
*/
|
|
32
|
+
import { Amount, Hex, ListGroup, style } from '@tempoxyz/ds'
|
|
33
|
+
|
|
34
|
+
/** Renders the static preview, which the guideline card shows inert. */
|
|
35
|
+
export function Demo() {
|
|
36
|
+
return (
|
|
37
|
+
<ListGroup.Root {...styles.rows()}>
|
|
38
|
+
<ListGroup.Row>
|
|
39
|
+
<ListGroup.Label>To</ListGroup.Label>
|
|
40
|
+
<Hex value="0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc" />
|
|
41
|
+
</ListGroup.Row>
|
|
42
|
+
<ListGroup.Row>
|
|
43
|
+
<ListGroup.Label>Amount</ListGroup.Label>
|
|
44
|
+
<Amount symbol="USDC" value="250.00" />
|
|
45
|
+
</ListGroup.Row>
|
|
46
|
+
<ListGroup.Row>
|
|
47
|
+
<ListGroup.Label>Network fee</ListGroup.Label>
|
|
48
|
+
<Amount currency="USD" precise value="0.0003" />
|
|
49
|
+
</ListGroup.Row>
|
|
50
|
+
</ListGroup.Root>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
namespace styles {
|
|
55
|
+
export const rows = style({ maxWidth: '18rem !custom', width: '100% !custom' })
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Don't:** Show protocol fields, base units, or gas parameters on a payment review.
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
/**
|
|
63
|
+
* Don't example for "Clear, Not Simplistic" on the Voice page.
|
|
64
|
+
* Don't show protocol fields, base units, or gas parameters on a payment review.
|
|
65
|
+
* @module
|
|
66
|
+
*/
|
|
67
|
+
import { ListGroup, style } from '@tempoxyz/ds'
|
|
68
|
+
|
|
69
|
+
/** Renders the static preview, which the guideline card shows inert. */
|
|
70
|
+
export function Demo() {
|
|
71
|
+
return (
|
|
72
|
+
<ListGroup.Root {...styles.rows()}>
|
|
73
|
+
<ListGroup.Row>
|
|
74
|
+
<ListGroup.Label>Recipient EOA</ListGroup.Label>
|
|
75
|
+
<span {...styles.value()}>0x3c44cddd…</span>
|
|
76
|
+
</ListGroup.Row>
|
|
77
|
+
<ListGroup.Row>
|
|
78
|
+
<ListGroup.Label>Value</ListGroup.Label>
|
|
79
|
+
<span {...styles.value()}>250000000</span>
|
|
80
|
+
</ListGroup.Row>
|
|
81
|
+
<ListGroup.Row>
|
|
82
|
+
<ListGroup.Label>Gas limit</ListGroup.Label>
|
|
83
|
+
<span {...styles.value()}>21000</span>
|
|
84
|
+
</ListGroup.Row>
|
|
85
|
+
</ListGroup.Root>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
namespace styles {
|
|
90
|
+
export const rows = style({ maxWidth: '18rem !custom', width: '100% !custom' })
|
|
91
|
+
|
|
92
|
+
export const value = style({ typography: 'mono.m1' })
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Precise, Not Approximate
|
|
97
|
+
|
|
98
|
+
**Do:** State the exact amount, time, or limit.
|
|
99
|
+
|
|
100
|
+
```tsx
|
|
101
|
+
<Alert>
|
|
102
|
+
<Alert.Icon />
|
|
103
|
+
<Alert.Content>This quote expires in 10 minutes.</Alert.Content>
|
|
104
|
+
</Alert>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Don't:** Use vague words such as soon or shortly.
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
<Alert>
|
|
111
|
+
<Alert.Icon />
|
|
112
|
+
<Alert.Content>This quote expires soon.</Alert.Content>
|
|
113
|
+
</Alert>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Confident, Not Boastful
|
|
117
|
+
|
|
118
|
+
**Do:** Confirm the result as a fact, and stop.
|
|
119
|
+
|
|
120
|
+
```tsx
|
|
121
|
+
<Empty.Root>
|
|
122
|
+
<Empty.Icon>
|
|
123
|
+
<Receipt />
|
|
124
|
+
</Empty.Icon>
|
|
125
|
+
<Empty.Title>Payment sent</Empty.Title>
|
|
126
|
+
<Empty.Description>Alice received 25.00 USDC.</Empty.Description>
|
|
127
|
+
</Empty.Root>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Don't:** Use hype, hedging, exclamation marks, or emoji for a routine result.
|
|
131
|
+
|
|
132
|
+
```tsx
|
|
133
|
+
<Empty.Root>
|
|
134
|
+
<Empty.Icon>
|
|
135
|
+
<Receipt />
|
|
136
|
+
</Empty.Icon>
|
|
137
|
+
<Empty.Title>Woohoo! 🎉</Empty.Title>
|
|
138
|
+
<Empty.Description>Your lightning-fast payment is on its way!</Empty.Description>
|
|
139
|
+
</Empty.Root>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Calm, Not Casual
|
|
143
|
+
|
|
144
|
+
**Do:** State what failed, and reassure the reader with a fact.
|
|
145
|
+
|
|
146
|
+
```tsx
|
|
147
|
+
<Alert intent="negative">
|
|
148
|
+
<Alert.Icon />
|
|
149
|
+
<Alert.Content>The payment did not go through. Your balance has not changed.</Alert.Content>
|
|
150
|
+
</Alert>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Don't:** Joke about a failure that involves money.
|
|
154
|
+
|
|
155
|
+
```tsx
|
|
156
|
+
<Alert intent="negative">
|
|
157
|
+
<Alert.Icon />
|
|
158
|
+
<Alert.Content>Oops! Something broke. Our bad.</Alert.Content>
|
|
159
|
+
</Alert>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Respectful, Not Condescending
|
|
163
|
+
|
|
164
|
+
**Do:** Address the reader as you, and describe the problem and the fix.
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
<Alert intent="negative">
|
|
168
|
+
<Alert.Icon />
|
|
169
|
+
<Alert.Content>This address isn't valid. Check it and try again.</Alert.Content>
|
|
170
|
+
</Alert>
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Don't:** Blame the reader for an error.
|
|
174
|
+
|
|
175
|
+
```tsx
|
|
176
|
+
<Alert intent="negative">
|
|
177
|
+
<Alert.Icon />
|
|
178
|
+
<Alert.Content>You entered an invalid address.</Alert.Content>
|
|
179
|
+
</Alert>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Helpful, Not Pushy
|
|
183
|
+
|
|
184
|
+
**Do:** Offer the next step plainly, and let the reader decide.
|
|
185
|
+
|
|
186
|
+
```tsx
|
|
187
|
+
<Button variant="secondary">Turn on notifications</Button>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Don't:** Use fear or urgency to drive a choice.
|
|
191
|
+
|
|
192
|
+
```tsx
|
|
193
|
+
<Button variant="secondary">Don't miss out</Button>
|
|
194
|
+
```
|