Skip to content

Commit

Permalink
fix(plasma-icons): replace primary var to hardcode value
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakutoc committed Mar 14, 2024
1 parent 154df3a commit a0df0c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/plasma-icons/src/old/IconRoot.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import styled, { css } from 'styled-components';
import { primary } from '@salutejs/plasma-core';

const sizeMap = {
xs: 1, // 16px
Expand Down Expand Up @@ -34,7 +33,7 @@ const StyledRoot = styled.div<{ w: string }>`
`;

export const IconRoot: React.FC<IconRootProps> = ({ icon: IconComponent, size, color, className }) => {
const c = color || primary;
const c = color || 'var(--plasma-colors-primary)';

const w = `${sizeMap[size]}rem`;

Expand Down
3 changes: 1 addition & 2 deletions packages/plasma-icons/src/scalable/IconRoot.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import styled, { css } from 'styled-components';
import { primary } from '@salutejs/plasma-core';

export const sizeMap = {
xs: {
Expand Down Expand Up @@ -61,7 +60,7 @@ export const getIconComponent = (
};

export const IconRoot: React.FC<IconRootProps> = ({ icon: Icon, size, color, className }) => {
const c = color || primary;
const c = color || 'var(--plasma-colors-primary)';

const w = `${sizeMap[size].scale}rem`;

Expand Down

0 comments on commit a0df0c3

Please sign in to comment.