Skip to content

Commit

Permalink
fix(plasma-theme-builder): add temp views
Browse files Browse the repository at this point in the history
  • Loading branch information
neretin-trike committed Mar 21, 2024
1 parent a2afd17 commit e4c1aae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions website/plasma-theme-builder/src/components/Token/Token.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button, TextM, Tooltip } from '@salutejs/plasma-b2c';
import { IconTrashFilled, IconEye, IconEdit } from '@salutejs/plasma-icons';

import { iconButtonFade } from '../mixins';
import { normalizeValue, getHEXAColor, getRGBAColor, TokenContext, getBackgroundColor } from '../../utils';
import { normalizeValue, getHEXAColor, TokenContext, getBackgroundColor, getHSLARawColor } from '../../utils';
import type { TokenValue } from '../../types';
import { PreviewColor } from '../PreviewColor/PreviewColor';

Expand Down Expand Up @@ -136,13 +136,16 @@ export const Token = ({ section, subsection, name, data }: TokenProps) => {
onClick={onTokenEditClick}
onMouseLeave={onMouseLeave}
onMouseEnter={onMouseEnter}
// INFO: Верну как было после дизайн-ревью
style={{ color: name.includes('Hover') || name.includes('Active') ? 'coral' : undefined }}
>
{name}
</TokenName>
</Tooltip>
<PreviewColor background={getBackgroundColor(value)} borderRadius="50%" size="1rem" />
<TokenHEXAValue>{getHEXAColor(normalizedValue)}</TokenHEXAValue>
<TokenRGBAValue>{getRGBAColor(normalizedValue)}</TokenRGBAValue>
{/* INFO: Верну как было после дизайн-ревью */}
<TokenRGBAValue>{getHSLARawColor(normalizedValue).toString()}</TokenRGBAValue>
<IconButtons>
<IconButton view="clear" onClick={onTokenEditClick} contentLeft={<IconEdit />} />
{canDelete && (
Expand Down

0 comments on commit e4c1aae

Please sign in to comment.