-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(plasma-new-hope): fix tokens usage in Tooltip
- Loading branch information
Showing
32 changed files
with
126 additions
and
270 deletions.
There are no files selected for viewing
Binary file modified
BIN
+44 Bytes
(100%)
...s/snapshots/b2c/components/Tooltip/Tooltip.component-test.tsx/multiple.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+39 Bytes
(100%)
...s/Tooltip/Tooltip.component-test.tsx/plasma-web Tooltip -- interaction.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+36 Bytes
(100%)
...nts/Tooltip/Tooltip.component-test.tsx/plasma-web Tooltip -- long text.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+251 Bytes
(100%)
...ip/Tooltip.component-test.tsx/plasma-web Tooltip -- multiple placement.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+68 Bytes
(100%)
...nent-test.tsx/plasma-web Tooltip -- out of bounds + multiple placement.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+41 Bytes
(100%)
...onents/Tooltip/Tooltip.component-test.tsx/plasma-web Tooltip -- simple.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+47 Bytes
(100%)
...oltip.component-test.tsx/plasma-web Tooltip -- wrapper overflow scroll.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+41 Bytes
(100%)
...ess/snapshots/b2c/components/Tooltip/Tooltip.component-test.tsx/single.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+36 Bytes
(100%)
...s/snapshots/web/components/Tooltip/Tooltip.component-test.tsx/multiple.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+33 Bytes
(100%)
...s/Tooltip/Tooltip.component-test.tsx/plasma-web Tooltip -- interaction.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+39 Bytes
(100%)
...nts/Tooltip/Tooltip.component-test.tsx/plasma-web Tooltip -- long text.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+263 Bytes
(100%)
...ip/Tooltip.component-test.tsx/plasma-web Tooltip -- multiple placement.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+65 Bytes
(100%)
...nent-test.tsx/plasma-web Tooltip -- out of bounds + multiple placement.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+39 Bytes
(100%)
...onents/Tooltip/Tooltip.component-test.tsx/plasma-web Tooltip -- simple.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+38 Bytes
(100%)
...oltip.component-test.tsx/plasma-web Tooltip -- wrapper overflow scroll.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+25 Bytes
(100%)
...ess/snapshots/web/components/Tooltip/Tooltip.component-test.tsx/single.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,10 @@ | ||
import React, { forwardRef, ForwardRefExoticComponent, RefAttributes } from 'react'; | ||
import { | ||
TooltipProps, | ||
TooltipPropsWithConfig, | ||
tooltipConfig, | ||
popoverConfig, | ||
component, | ||
mergeConfig, | ||
} from '@salutejs/plasma-new-hope/styled-components'; | ||
import { ForwardRefExoticComponent, RefAttributes } from 'react'; | ||
import { TooltipProps, tooltipConfig, component, mergeConfig } from '@salutejs/plasma-new-hope/styled-components'; | ||
|
||
import { config, popoverCustomConfigS, popoverCustomConfigM } from './Tooltip.config'; | ||
import { config } from './Tooltip.config'; | ||
|
||
const mergedPopoverConfigS = mergeConfig(popoverConfig, popoverCustomConfigS); | ||
const mergedPopoverConfigM = mergeConfig(popoverConfig, popoverCustomConfigM); | ||
const mergedConfig = mergeConfig(tooltipConfig, config); | ||
|
||
export const TooltipComponent = component(mergedConfig) as ForwardRefExoticComponent< | ||
TooltipPropsWithConfig & RefAttributes<HTMLSpanElement> | ||
export const Tooltip = component(mergedConfig) as ForwardRefExoticComponent< | ||
TooltipProps & RefAttributes<HTMLDivElement> | ||
>; | ||
|
||
export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>((props, outerRef) => { | ||
const popoverInnerConfig = props.size === 'm' ? mergedPopoverConfigM : mergedPopoverConfigS; | ||
return <TooltipComponent ref={outerRef} {...props} config={popoverInnerConfig} />; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { tooltipRoot, tooltipConfig } from './Tooltip'; | ||
export { tokens as tooltipTokens } from './Tooltip.tokens'; | ||
export type { TooltipProps, TooltipPropsWithConfig } from './Tooltip.types'; | ||
export type { TooltipProps } from './Tooltip.types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 5 additions & 13 deletions
18
packages/plasma-new-hope/src/examples/plasma_b2c/components/Tooltip/Tooltip.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
import React, { forwardRef, ForwardRefExoticComponent, RefAttributes } from 'react'; | ||
import { ForwardRefExoticComponent, RefAttributes } from 'react'; | ||
|
||
import { TooltipProps, TooltipPropsWithConfig, tooltipConfig } from '../../../../components/Tooltip'; | ||
import { TooltipProps, tooltipConfig } from '../../../../components/Tooltip'; | ||
import { component, mergeConfig } from '../../../../engines'; | ||
import { popoverConfig } from '../../../../components/Popover'; | ||
|
||
import { config, popoverCustomConfigS, popoverCustomConfigM } from './Tooltip.config'; | ||
import { config } from './Tooltip.config'; | ||
|
||
export type { TooltipProps } from '../../../../components/Tooltip'; | ||
|
||
const mergedPopoverConfigS = mergeConfig(popoverConfig, popoverCustomConfigS); | ||
const mergedPopoverConfigM = mergeConfig(popoverConfig, popoverCustomConfigM); | ||
const mergedConfig = mergeConfig(tooltipConfig, config); | ||
|
||
export const TooltipComponent = component(mergedConfig) as ForwardRefExoticComponent< | ||
TooltipPropsWithConfig & RefAttributes<HTMLSpanElement> | ||
export const Tooltip = component(mergedConfig) as ForwardRefExoticComponent< | ||
TooltipProps & RefAttributes<HTMLSpanElement> | ||
>; | ||
|
||
export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>((props, outerRef) => { | ||
const popoverInnerConfig = props.size === 'm' ? mergedPopoverConfigM : mergedPopoverConfigS; | ||
return <TooltipComponent ref={outerRef} {...props} config={popoverInnerConfig} />; | ||
}); |
Oops, something went wrong.