diff --git a/packages/playground-react/pages/combinations/form.tsx b/packages/playground-react/pages/combinations/form.tsx index 99bc2f448e..1b34c2e304 100644 --- a/packages/playground-react/pages/combinations/form.tsx +++ b/packages/playground-react/pages/combinations/form.tsx @@ -23,12 +23,6 @@ export default function App() { let [result, setResult] = useState(() => typeof window === 'undefined' || typeof document === 'undefined' ? [] : new FormData() ) - let [notifications, setNotifications] = useState(false) - let [apple, setApple] = useState(false) - let [banana, setBanana] = useState(false) - let [size, setSize] = useState(sizes[0]) - let [person, setPerson] = useState(people[0]) - let [activeLocation, setActiveLocation] = useState(locations[0]) let [query, setQuery] = useState('') return ( @@ -47,8 +41,7 @@ export default function App() { Enable notifications classNames( @@ -74,8 +67,6 @@ export default function App() { Apple @@ -99,8 +90,6 @@ export default function App() { Banana @@ -123,7 +112,7 @@ export default function App() {
- +
{sizes.map((size) => { return ( @@ -177,75 +166,83 @@ export default function App() {
- -
- - - {person.name.first} - - - - + + {({ value }) => ( + <> +
+ + + {value?.name?.first} + + + + + + - - -
- - {people.map((person) => ( - { - return classNames( - 'relative cursor-default select-none py-2 pl-3 pr-9 ', - active ? 'bg-blue-600 text-white' : 'text-gray-900' - ) - }} - > - {({ active, selected }) => ( - <> - - {person.name.first} - - {selected && ( - + + {people.map((person) => ( + { + return classNames( + 'relative cursor-default select-none py-2 pl-3 pr-9 ', + active ? 'bg-blue-600 text-white' : 'text-gray-900' + ) + }} + > + {({ active, selected }) => ( + <> + + {person.name.first} + + {selected && ( + + + + + )} - > - - - - + )} - - )} - - ))} - -
-
+ + ))} + +
+
+ + )}
@@ -253,13 +250,12 @@ export default function App() {
{ - setActiveLocation(location) setQuery('') }} > - {({ open }) => { + {({ open, value }) => { return (
@@ -271,7 +267,7 @@ export default function App() {