From ba769adaecccb69a5123379704e4120d603e0597 Mon Sep 17 00:00:00 2001 From: Corban Riley Date: Thu, 10 Oct 2024 13:15:40 -0400 Subject: [PATCH] Fixing util imports --- src/css/tailwind.ts | 14 +++++++++++++- src/css/utils.ts | 3 --- transforms/tailwind-transform.ts | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/css/tailwind.ts b/src/css/tailwind.ts index fd7fe16f7..9f0ae5660 100644 --- a/src/css/tailwind.ts +++ b/src/css/tailwind.ts @@ -1,5 +1,6 @@ +import { isTruthy, kebabize } from '../utils' + import { Atoms } from './atoms' -import { isTruthy, kebabize } from './utils' type TextVariant = 'ellipsis' | 'capitalize' | 'lowercase' | 'uppercase' @@ -195,6 +196,17 @@ const tailwindMap: { return null }, + textDecoration: value => { + switch (value) { + case 'none': + return 'no-underline' + case 'underline': + return 'underline' + } + + return null + }, + textOverflow: value => { switch (value) { case 'ellipsis': diff --git a/src/css/utils.ts b/src/css/utils.ts index 08236d2b1..64699ab9b 100644 --- a/src/css/utils.ts +++ b/src/css/utils.ts @@ -22,6 +22,3 @@ export const responsiveStyle = (rules: { export const selectorize = (classNames: string) => '.' + classNames.split(' ').join('.') - -export const isTruthy = (value: T | undefined | null): value is T => - Boolean(value) diff --git a/transforms/tailwind-transform.ts b/transforms/tailwind-transform.ts index c32d2b361..581903ebd 100644 --- a/transforms/tailwind-transform.ts +++ b/transforms/tailwind-transform.ts @@ -11,7 +11,7 @@ import { TailwindMapName, TAILWIND_MAP_NAMES, } from '../src/css/tailwind' -import { isTruthy } from '../src/css/utils' +import { isTruthy } from '../src/utils' const COMPONENTS = ['Box', 'Text']