Skip to content

Commit 357fbf4

Browse files
committed
feat: Add Select form component
1 parent 3927d18 commit 357fbf4

22 files changed

+1020
-534
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
'use client'
2-
export { default } from '@app/core/routes/demos/forms/index'
2+
export { default, dynamic } from '@app/core/routes/demos/forms/index'

apps/next/app/NextClientRootLayout.tsx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use client'
22
import React from 'react'
3+
import { SafeAreaProvider } from 'react-native-safe-area-context'
34
import UniversalAppProviders from '@app/screens/UniversalAppProviders'
45
import { Image as NextContextImage } from '@green-stack/core/components/Image.next'
56
import { Link as NextContextLink } from '@green-stack/core/navigation/Link.next'
@@ -26,15 +27,22 @@ const NextClientRootLayout = ({ children }: NextClientRootLayoutProps) => {
2627
// -- Render --
2728

2829
return (
29-
<UniversalAppProviders
30-
contextImage={NextContextImage}
31-
contextLink={NextContextLink}
32-
contextRouter={nextContextRouter}
33-
useContextRouteParams={useNextRouteParams}
34-
isNext
30+
<SafeAreaProvider
31+
initialMetrics={{
32+
frame: { x: 0, y: 0, width: 0, height: 0 },
33+
insets: { top: 0, right: 0, bottom: 0, left: 0 },
34+
}}
3535
>
36-
{children}
37-
</UniversalAppProviders>
36+
<UniversalAppProviders
37+
contextImage={NextContextImage}
38+
contextLink={NextContextLink}
39+
contextRouter={nextContextRouter}
40+
useContextRouteParams={useNextRouteParams}
41+
isNext
42+
>
43+
{children}
44+
</UniversalAppProviders>
45+
</SafeAreaProvider>
3846
)
3947
}
4048

apps/next/app/NextServerRootLayout.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ import NextClientRootLayout from './NextClientRootLayout'
1111
/* --- Types ----------------------------------------------------------------------------------- */
1212

1313
type NextServerRootLayoutProps = {
14-
children: ReactNode
14+
children: ReactNode
1515
}
1616

1717
/* --- <NextServerRootLayout/> ----------------------------------------------------------------- */
1818

1919
const NextServerRootLayout = ({ children }: NextServerRootLayoutProps) => (
20-
<Document>
21-
<NextClientRootLayout>
22-
{children}
23-
</NextClientRootLayout>
24-
</Document>
20+
<Document>
21+
<NextClientRootLayout>
22+
{children}
23+
</NextClientRootLayout>
24+
</Document>
2525
)
2626

2727
/* --- Exports --------------------------------------------------------------------------------- */

features/@app-core/forms/Checkbox.styled.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { forwardRef, ElementRef } from 'react'
22
import { CheckboxRoot, CheckboxIndicator } from '@green-stack/forms/Checkbox.primitives'
3-
import { cn, theme, View, Text, Pressable } from '../components/styled'
3+
import { cn, theme, Text, Pressable } from '../components/styled'
44
import { CheckFilled } from '../icons/CheckFilled'
55
import { z, schema, PropsOf } from '@green-stack/schemas'
66

features/@app-core/forms/RadioGroup.styled.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ReactNode, ElementRef } from 'react'
1+
import type { ReactNode, ElementRef, Dispatch, SetStateAction } from 'react'
22
import { createContext, useContext, useState, useEffect, forwardRef } from 'react'
33
import { RadioGroupRoot, RadioGroupItem, RadioGroupIndicator } from '@green-stack/forms/RadioGroup.primitives'
44
import { cn, View, Text, Pressable } from '../components/styled'
@@ -8,7 +8,7 @@ import { z, schema, PropsOf } from '@green-stack/schemas'
88

99
export type RadioGroupContext = {
1010
value: string,
11-
setValue: (value: string) => void,
11+
setValue: Dispatch<SetStateAction<string>>,
1212
}
1313

1414
export const RadioGroupContext = createContext<RadioGroupContext | undefined>(undefined)
@@ -70,8 +70,8 @@ export const RadioButton = forwardRef<
7070
id={nativeID}
7171
aria-labelledby={labelledByID}
7272
onPress={() => setValue(value)}
73+
{...props}
7374
hitSlop={props.hitSlop}
74-
{...rawProps}
7575
className={cn(
7676
'aspect-square h-4 w-4 rounded-full justify-centeritems-center border border-primary text-primary ',
7777
'native:h-[20] native:w-[20]',

0 commit comments

Comments
 (0)