Skip to content

Commit 2446215

Browse files
committed
fix: pro build
1 parent bdac6d6 commit 2446215

4 files changed

Lines changed: 14 additions & 18 deletions

File tree

apps/pro/src/app/globals.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
@use '@tiny-design/tokens/scss/base' as *;
22
@use 'style/component' as *;
33

4+
:root {
5+
--font-heading:
6+
'Avenir Next', avenir, montserrat, 'Segoe UI', 'Helvetica Neue', arial, sans-serif;
7+
--font-body:
8+
'Aptos', 'Avenir Next', 'Segoe UI', inter, roboto, 'Helvetica Neue', arial, sans-serif;
9+
}
10+
411
*,
512
*::before,
613
*::after {

apps/pro/src/app/layout.tsx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,16 @@
11
import type { Metadata } from 'next';
2-
import { Bricolage_Grotesque, DM_Sans } from 'next/font/google';
32
import { ThemeScript } from '../components/theme-script';
43
import { SiteHeader } from '../components/layout/site-header';
54
import './globals.scss';
65

7-
const heading = Bricolage_Grotesque({
8-
subsets: ['latin'],
9-
variable: '--font-heading',
10-
display: 'swap',
11-
weight: ['400', '500', '600', '700', '800'],
12-
});
13-
14-
const body = DM_Sans({
15-
subsets: ['latin'],
16-
variable: '--font-body',
17-
display: 'swap',
18-
weight: ['400', '500', '600', '700'],
19-
});
20-
216
export const metadata: Metadata = {
227
title: 'Tiny Design Pro',
238
description: 'Beautiful, ready-to-use UI blocks built with Tiny Design components.',
249
};
2510

2611
export default function RootLayout({ children }: { children: React.ReactNode }) {
2712
return (
28-
<html lang="en" className={`${heading.variable} ${body.variable}`} suppressHydrationWarning>
13+
<html lang="en" suppressHydrationWarning>
2914
<body>
3015
<ThemeScript />
3116
<SiteHeader />

packages/react/src/input/input-group.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ const InputGroup = (props: InputGroupProps): React.ReactElement => {
2121

2222
return (
2323
<div {...otherProps} className={cls}>
24-
{React.Children.map(children, (child: React.ReactElement) => {
24+
{React.Children.map(children, (child) => {
25+
if (!React.isValidElement(child)) {
26+
return child;
27+
}
28+
2529
const childProps: Partial<InputProps> = {
2630
disabled,
2731
size: inputSize as SizeType,

packages/react/src/textarea/textarea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>((props, ref) =>
3434
[`${prefixCls}_disabled`]: disabled,
3535
});
3636
const [count, setCount] = useState(0);
37-
const containerRef = useRef<HTMLDivElement>(null);
37+
const containerRef = useRef<HTMLDivElement | null>(null);
3838
const minHeightRef = useRef<number | null>(null);
3939

4040
const textareaOnChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {

0 commit comments

Comments
 (0)