diff options
author | dan <dan.abramov@gmail.com> | 2024-11-21 20:44:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-21 20:44:40 +0000 |
commit | cc60566cde880deeea1e50774a2108af8f7766f8 (patch) | |
tree | 5b6c925bf4331907fe57a094e30d6a23615debf4 /src/view/com/util/text/Text.tsx | |
parent | ff23ddb556be4b2a9c4029dce6f857df34fc0b6b (diff) | |
download | voidsky-cc60566cde880deeea1e50774a2108af8f7766f8.tar.zst |
Fix Fast Refresh in <Text> files (#6609)
* Separate non-components from components * Mark old Text as deprecated * Move emoji utilities to non-React file * Fix type * Fix import
Diffstat (limited to 'src/view/com/util/text/Text.tsx')
-rw-r--r-- | src/view/com/util/text/Text.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/view/com/util/text/Text.tsx b/src/view/com/util/text/Text.tsx index dbf5e2e13..a5278e0a0 100644 --- a/src/view/com/util/text/Text.tsx +++ b/src/view/com/util/text/Text.tsx @@ -12,7 +12,7 @@ import { childIsString, renderChildrenWithEmoji, StringChild, -} from '#/components/Typography' +} from '#/alf/typography' import {IS_DEV} from '#/env' export type CustomTextProps = Omit<TextProps, 'children'> & { @@ -32,7 +32,11 @@ export type CustomTextProps = Omit<TextProps, 'children'> & { } ) -export function Text({ +export {Text_DEPRECATED as Text} +/** + * @deprecated use Text from Typography instead. + */ +function Text_DEPRECATED({ type = 'md', children, emoji, |