Skip to content

Commit 31d0ce2

Browse files
committed
Replace <b> with <Text> and semiBold variant to highlight key values in the description
1 parent 0f45d73 commit 31d0ce2

File tree

1 file changed

+79
-43
lines changed

1 file changed

+79
-43
lines changed

redisinsight/ui/src/components/notifications/success-messages.tsx

Lines changed: 79 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,45 @@ export default {
2121
ADDED_NEW_INSTANCE: (instanceName: string) => ({
2222
title: 'Database has been added',
2323
message: (
24-
<>
25-
<b>{formatNameShort(instanceName)}</b> has been added to Redis Insight.
26-
</>
24+
<Text component="span">
25+
<Text variant="semiBold" component="span">
26+
{formatNameShort(instanceName)}
27+
</Text>{' '}
28+
has been added to Redis Insight.
29+
</Text>
2730
),
2831
}),
2932
ADDED_NEW_RDI_INSTANCE: (instanceName: string) => ({
3033
title: 'Instance has been added',
3134
message: (
32-
<>
33-
<b>{formatNameShort(instanceName)}</b> has been added to RedisInsight.
34-
</>
35+
<Text component="span">
36+
<Text variant="semiBold" component="span">
37+
{formatNameShort(instanceName)}
38+
</Text>{' '}
39+
has been added to RedisInsight.
40+
</Text>
3541
),
3642
}),
3743
DELETE_INSTANCE: (instanceName: string) => ({
3844
title: 'Database has been deleted',
3945
message: (
40-
<>
41-
<b>{formatNameShort(instanceName)}</b> has been deleted from Redis
42-
Insight.
43-
</>
46+
<Text component="span">
47+
<Text variant="semiBold" component="span">
48+
{formatNameShort(instanceName)}
49+
</Text>{' '}
50+
has been deleted from Redis Insight.
51+
</Text>
4452
),
4553
}),
4654
DELETE_RDI_INSTANCE: (instanceName: string) => ({
4755
title: 'Instance has been deleted',
4856
message: (
49-
<>
50-
<b>{formatNameShort(instanceName)}</b> has been deleted from
51-
RedisInsight.
52-
</>
57+
<Text component="span">
58+
<Text variant="semiBold" component="span">
59+
{formatNameShort(instanceName)}
60+
</Text>{' '}
61+
has been deleted from RedisInsight.
62+
</Text>
5363
),
5464
}),
5565
DELETE_INSTANCES: (instanceNames: Maybe<string>[]) => {
@@ -58,10 +68,12 @@ export default {
5868
title: 'Databases have been deleted',
5969
message: (
6070
<>
61-
<span>
62-
<b>{instanceNames.length}</b> databases have been deleted from Redis
63-
Insight:
64-
</span>
71+
<Text component="span">
72+
<Text variant="semiBold" component="span">
73+
{instanceNames.length}
74+
</Text>{' '}
75+
databases have been deleted from Redis Insight:
76+
</Text>
6577
<ul style={{ marginBottom: 0 }}>
6678
{instanceNames.slice(0, limitShowRemovedInstances).map((el, i) => (
6779
// eslint-disable-next-line react/no-array-index-key
@@ -81,10 +93,12 @@ export default {
8193
title: 'Instances have been deleted',
8294
message: (
8395
<>
84-
<span>
85-
<b>{instanceNames.length}</b> instances have been deleted from
86-
RedisInsight:
87-
</span>
96+
<Text component="span">
97+
<Text variant="semiBold" component="span">
98+
{instanceNames.length}
99+
</Text>{' '}
100+
instances have been deleted from RedisInsight:
101+
</Text>
88102
<ul style={{ marginBottom: 0 }}>
89103
{instanceNames.slice(0, limitShowRemovedInstances).map((el, i) => (
90104
// eslint-disable-next-line react/no-array-index-key
@@ -101,17 +115,23 @@ export default {
101115
ADDED_NEW_KEY: (keyName: RedisResponseBuffer) => ({
102116
title: 'Key has been added',
103117
message: (
104-
<>
105-
<b>{formatNameShort(bufferToString(keyName))}</b> has been added.
106-
</>
118+
<Text component="span">
119+
<Text variant="semiBold" component="span">
120+
{formatNameShort(bufferToString(keyName))}
121+
</Text>{' '}
122+
has been added.
123+
</Text>
107124
),
108125
}),
109126
DELETED_KEY: (keyName: RedisResponseBuffer) => ({
110127
title: 'Key has been deleted',
111128
message: (
112-
<>
113-
<b>{formatNameShort(bufferToString(keyName))}</b> has been deleted.
114-
</>
129+
<Text component="span">
130+
<Text variant="semiBold" component="span">
131+
{formatNameShort(bufferToString(keyName))}
132+
</Text>{' '}
133+
has been deleted.
134+
</Text>
115135
),
116136
}),
117137
REMOVED_KEY_VALUE: (
@@ -126,9 +146,13 @@ export default {
126146
),
127147
message: (
128148
<>
129-
<b>{formatNameShort(bufferToString(keyValue))}</b> has been removed from
130-
&nbsp;
131-
<b>{formatNameShort(bufferToString(keyName))}</b>
149+
<Text variant="semiBold" component="span">
150+
{formatNameShort(bufferToString(keyValue))}
151+
</Text>{' '}
152+
has been removed from &nbsp;
153+
<Text variant="semiBold" component="span">
154+
{formatNameShort(bufferToString(keyName))}
155+
</Text>
132156
</>
133157
),
134158
}),
@@ -183,9 +207,12 @@ export default {
183207
MESSAGE_ACTION: (message: string, actionName: string) => ({
184208
title: <>Message has been {actionName}</>,
185209
message: (
186-
<>
187-
<b>{message}</b> has been successfully {actionName}.
188-
</>
210+
<Text component="span">
211+
<Text variant="semiBold" component="span">
212+
{message}
213+
</Text>{' '}
214+
has been successfully {actionName}.
215+
</Text>
189216
),
190217
}),
191218
NO_CLAIMED_MESSAGES: () => ({
@@ -199,9 +226,12 @@ export default {
199226
DELETE_INDEX: (indexName: string) => ({
200227
title: 'Index has been deleted',
201228
message: (
202-
<>
203-
<b>{formatNameShort(indexName)}</b> has been deleted.
204-
</>
229+
<Text component="span">
230+
<Text variant="semiBold" component="span">
231+
{formatNameShort(indexName)}
232+
</Text>{' '}
233+
has been deleted.
234+
</Text>
205235
),
206236
}),
207237
TEST_CONNECTION: () => ({
@@ -264,17 +294,23 @@ export default {
264294
DELETE_LIBRARY: (libraryName: string) => ({
265295
title: 'Library has been deleted',
266296
message: (
267-
<>
268-
<b>{formatNameShort(libraryName)}</b> has been deleted.
269-
</>
297+
<Text component="span">
298+
<Text variant="semiBold" component="span">
299+
{formatNameShort(libraryName)}
300+
</Text>{' '}
301+
has been deleted.
302+
</Text>
270303
),
271304
}),
272305
ADD_LIBRARY: (libraryName: string) => ({
273306
title: 'Library has been added',
274307
message: (
275-
<>
276-
<b>{formatNameShort(libraryName)}</b> has been added.
277-
</>
308+
<Text component="span">
309+
<Text variant="semiBold" component="span">
310+
{formatNameShort(libraryName)}
311+
</Text>{' '}
312+
has been added.
313+
</Text>
278314
),
279315
}),
280316
REMOVED_ALL_CAPI_KEYS: () => ({

0 commit comments

Comments
 (0)