Skip to content

Commit

Permalink
fixed rendring
Browse files Browse the repository at this point in the history
  • Loading branch information
mimarz committed Jan 3, 2025
1 parent e83285d commit fd11fd3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apps/storefront/components/Tokens/TokenList/TokenList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
Paragraph,
Table,
} from '@digdir/designsystemet-react';
import { getColorNameFromNumber } from '@digdir/designsystemet/color';
import { ClipboardButton } from '@repo/components';
import cl from 'clsx/lite';
import type { HTMLAttributes } from 'react';
Expand All @@ -16,7 +15,7 @@ import type { TransformedToken as Token } from 'style-dictionary';
import * as tokensDark from '../../../tokens/dark';
import * as tokensLight from '../../../tokens/light';
import { capitalizeString } from '../../../utils/StringHelpers';
import { TokenColor, getColorWeight } from '../TokenColor/TokenColor';
import { TokenColor } from '../TokenColor/TokenColor';
import { TokenFontSize } from '../TokenFontSize/TokenFontSize';
import { TokenShadow } from '../TokenShadow/TokenShadow';
import { TokenSize } from '../TokenSize/TokenSize';
Expand Down Expand Up @@ -150,8 +149,6 @@ const TokenCard = ({ token, type, hideValue, ...rest }: TokenCardProps) => {
.slice(token.path.length - 1, token.path.length)
.toString();

const weight = getColorWeight(token.original.$value as string);

return (
<div className={classes.card} {...rest}>
<div className={classes.preview}>
Expand All @@ -162,7 +159,7 @@ const TokenCard = ({ token, type, hideValue, ...rest }: TokenCardProps) => {

<div className={classes.textContainer}>
<Heading level={5} data-size='2xs' className={classes.name}>
{weight ? getColorNameFromNumber(weight) : capitalizeString(title)}
{capitalizeString(title)}
&nbsp;
<ClipboardButton
title='Kopier CSS variabel'
Expand Down

0 comments on commit fd11fd3

Please sign in to comment.