import type { Meta, StoryObj } from "@storybook/react-native-web-vite"; import React from "react"; import { View } from "react-native"; import { SafeAreaProvider } from "react-native-safe-area-context"; import { PortalHost } from "@rn-primitives/portal"; import { useRootContext } from "@rn-primitives/select"; import { SelectPrimitive } from "./SelectPrimitive"; import { Text } from "../../Text"; import { Icon } from "../../Icon"; const meta = { title: "Components/Primitives/SelectPrimitive", component: SelectPrimitive.Root, parameters: { viewport: { defaultViewport: "mobile1" }, }, decorators: [ (Story: React.ComponentType) => ( <> ), ], } satisfies Meta; export default meta; type Story = StoryObj; const CITIES = [ { value: "tor", label: "Toronto" }, { value: "van", label: "Vancouver" }, { value: "edm", label: "Edmonton" }, { value: "wpg", label: "Winnipeg" }, { value: "hal", label: "Halifax" }, ]; /** Composes an option row from the styled `ItemText` + `ItemIndicator` parts. */ function Option({ value, label, disabled, }: { readonly value: string; readonly label: string; readonly disabled?: boolean; }) { return ( ); } function CityItems() { return ( <> {CITIES.map(city => (