@@ -12,7 +12,7 @@ import {PropsFor, View} from "@khanacademy/wonder-blocks-core";
12
12
import { TextField } from "@khanacademy/wonder-blocks-form" ;
13
13
import IconButton from "@khanacademy/wonder-blocks-icon-button" ;
14
14
import { OnePaneDialog , ModalLauncher } from "@khanacademy/wonder-blocks-modal" ;
15
- import { color , spacing } from "@khanacademy/wonder-blocks-tokens" ;
15
+ import { semanticColor , spacing } from "@khanacademy/wonder-blocks-tokens" ;
16
16
import { Body } from "@khanacademy/wonder-blocks-typography" ;
17
17
import { PhosphorIcon } from "@khanacademy/wonder-blocks-icon" ;
18
18
@@ -313,7 +313,7 @@ export const WithStyle: StoryComponentType = () => {
313
313
< View style = { [ styles . centered , styles . row ] } >
314
314
< Tooltip
315
315
contentStyle = { {
316
- color : color . white ,
316
+ color : semanticColor . text . inverse ,
317
317
padding : spacing . xLarge_32 ,
318
318
} }
319
319
content = { `This is a styled tooltip.` }
@@ -337,25 +337,6 @@ WithStyle.parameters = {
337
337
} ,
338
338
} ;
339
339
340
- WithStyle . play = async ( { canvasElement} ) => {
341
- const canvas = within ( canvasElement . ownerDocument . body ) ;
342
-
343
- // Get HTML elements
344
- const tooltipContent = await canvas . findByTestId ( "test-tooltip-content" ) ;
345
- const innerTooltipView =
346
- // eslint-disable-next-line testing-library/no-node-access
347
- ( await canvas . findByRole ( "tooltip" ) ) . firstChild ;
348
-
349
- // Assert
350
- await expect ( innerTooltipView ) . toHaveStyle (
351
- "background-color: rgb(11, 33, 73)" ,
352
- ) ;
353
- await expect ( tooltipContent ) . toHaveStyle ( {
354
- padding : "32px" ,
355
- color : "#fff" ,
356
- } ) ;
357
- } ;
358
-
359
340
/**
360
341
* Tooltip by default (and for performance reasons) only updates its position
361
342
* under the following conditions:
@@ -474,7 +455,7 @@ const styles = StyleSheet.create({
474
455
height : "200vh" ,
475
456
} ,
476
457
block : {
477
- border : `solid 1px ${ color . purple } ` ,
458
+ border : `solid 1px ${ semanticColor . mastery . primary } ` ,
478
459
width : spacing . xLarge_32 ,
479
460
height : spacing . xLarge_32 ,
480
461
alignItems : "center" ,
@@ -506,7 +487,12 @@ export const InTopCorner = {
506
487
icon = { info }
507
488
size = "small"
508
489
aria-hidden
509
- style = { { ":hover" : { backgroundColor : color . red } } }
490
+ style = { {
491
+ ":hover" : {
492
+ backgroundColor :
493
+ semanticColor . status . critical . foreground ,
494
+ } ,
495
+ } }
510
496
/>
511
497
</ Tooltip >
512
498
</ View >
0 commit comments