diff --git a/site/source/components/conversation/DateInput.tsx b/site/source/components/conversation/DateInput.tsx
index cf59f4b9d..7a6c2b7b2 100644
--- a/site/source/components/conversation/DateInput.tsx
+++ b/site/source/components/conversation/DateInput.tsx
@@ -1,13 +1,16 @@
-import { useCallback } from 'react'
+import { lazy, Suspense, useCallback } from 'react'
+import styled from 'styled-components'
import { InputProps } from '@/components/conversation/RuleInput'
-import { DateField } from '@/design-system/field'
import { DateFieldProps } from '@/design-system/field/DateField'
import { Spacing } from '@/design-system/layout'
+import Skeleton from '../ui/Skeleton'
import { useEngine } from '../utils/EngineContext'
import InputSuggestions from './InputSuggestions'
+const DateField = lazy(() => import('@/design-system/field/DateField'))
+
export default function DateInput({
suggestions,
onChange,
@@ -62,20 +65,31 @@ export default function DateInput({
}}
/>
)}
-
+ }>
+
+
)
}
+function DateFieldFallback() {
+ return
+}
+
+const Wrapper = styled(Skeleton)`
+ width: 218px;
+
+ height: 3.5rem;
+`
diff --git a/site/source/components/ui/Skeleton.tsx b/site/source/components/ui/Skeleton.tsx
index f2a25ab0c..895c22da4 100644
--- a/site/source/components/ui/Skeleton.tsx
+++ b/site/source/components/ui/Skeleton.tsx
@@ -1,8 +1,11 @@
+import { CSSProperties } from 'react'
import { keyframes, styled } from 'styled-components'
type SkeletonProps = {
width?: number
height?: number
+ className?: string
+ style?: CSSProperties
}
const skeletonKeyframes = keyframes`
@@ -14,14 +17,14 @@ const skeletonKeyframes = keyframes`
}
` as unknown as string // keyframes type are outdated, see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/48907
-export default function Skeleton({ width, height }: SkeletonProps) {
+export default function Skeleton({
+ style,
+ className,
+ height,
+ width,
+}: SkeletonProps) {
return (
-
+
)