From 0f8ed2e4f8a3a653dba559e175ee33243b5ec3fa Mon Sep 17 00:00:00 2001 From: Sword Edge Date: Wed, 12 Jul 2023 03:13:41 -0700 Subject: [PATCH] 2051-auto-complete-broken-for-typography-tokens (#2060) ![image](https://github.com/tokens-studio/figma-plugin/assets/25951419/0e0fd844-6fc8-463c-a0e9-49b00ab9569c) --- .../DownshiftInput/DownshiftInput.tsx | 1 - src/app/components/TypographyInput.tsx | 24 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/app/components/DownshiftInput/DownshiftInput.tsx b/src/app/components/DownshiftInput/DownshiftInput.tsx index 7b7b966ea..2c15c925f 100644 --- a/src/app/components/DownshiftInput/DownshiftInput.tsx +++ b/src/app/components/DownshiftInput/DownshiftInput.tsx @@ -314,7 +314,6 @@ export const DownshiftInput: React.FunctionComponent = ({ {getHighlightedText(token.name, searchInput || '')} {getResolvedText(token)} - ); }} diff --git a/src/app/components/TypographyInput.tsx b/src/app/components/TypographyInput.tsx index 41419a4c7..9d332f770 100644 --- a/src/app/components/TypographyInput.tsx +++ b/src/app/components/TypographyInput.tsx @@ -15,6 +15,18 @@ import SingleTypographyDownShiftInput from './SingleTypographyDownShiftInput'; import DownshiftInput from './DownshiftInput'; import Stack from './Stack'; +const properties = { + fontSize: 'fontSizes', + fontFamily: 'fontFamilies', + fontWeight: 'fontWeights', + letterSpacing: 'letterSpacing', + paragraphSpacing: 'paragraphSpacing', + paragraphIndent: 'paragraphIndent', + textDecoration: 'textDecoration', + lineHeight: 'lineHeights', + textCase: 'textCase', +}; + export default function TypographyInput({ internalEditToken, handleTypographyValueChange, @@ -64,18 +76,6 @@ export default function TypographyInput({ setAlias(''); }, [mode, selectedToken, internalEditToken, setTypographyValue]); - const properties = { - fontFamily: t('font.fontFamily'), - fontWeight: t('font.fontWeight'), - fontSize: t('font.fontSize'), - lineHeight: t('font.lineHeight'), - letterSpacing: t('font.letterSpacing'), - paragraphSpacing: t('font.paragraphSpacing'), - paragraphIndent: t('font.paragraphIndent'), - textDecoration: t('font.textDecoration'), - textCase: t('font.textCase'), - }; - return (