We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using Expo and the same tailwind.config.js in the main branch.
babel.config.js:
module.exports = function (api) { api.cache(true); return { presets: [ ["babel-preset-expo", { jsxImportSource: "nativewind" }], "nativewind/babel", ], };
metro.config.js:
const { getDefaultConfig } = require("expo/metro-config"); const { withNativeWind } = require("nativewind/metro"); const config = getDefaultConfig(__dirname); module.exports = withNativeWind(config, { input: "./global.css" });
dictionary.ts:
export const alphabet = [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", ] as const; export type Letter = (typeof alphabet)[number];
App.tsx:
import {type Letter, alphabet} from "dictionary"; import { useState } from "react"; import { Select } from "@/components/Select"; import { ToastProvider, useToast } from "@/components/Toast"; export default function HomeScreen() { return ( <ToastProvider position="top"> <SelectContainer /> </ToastProvider> ) } function SelectContainer() { const [selectedLetter, setSelectedLetter] = useState<Letter | undefined>(); const { toast } = useToast(); return ( <Select selectClasses="text-white border-white border-2" labelClasses="text-white" labelKey={"label"} onSelect={(value) => { toast(`Selected letter ${value}`, "success"); setSelectedLetter(value as Letter); }} selectedValue={ selectedLetter === undefined ? undefined : (selectedLetter as string) } options={alphabet.map((letter) => ({ label: letter.toLocaleUpperCase(), value: letter, }))} placeholder="Select a letter" valueKey={"value"} /> ); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm using Expo and the same tailwind.config.js in the main branch.
Other configurations
babel.config.js:
metro.config.js:
Select
Toast
Here is my sample code for both component:
dictionary.ts:
App.tsx:
The text was updated successfully, but these errors were encountered: