dzenda
dzenda
TTCTheo's Typesafe Cult
Created by dzenda on 6/28/2024 in #questions
Pandacss unknown values
Hey I am looking for some proficient in pandacss. First of all using pandas wasn't my choice. The problem: I am getting type errors because some -webkit vlaues dont exist in the "styled framework"
<p className={css({ 'display': '-webkit-box', '-webkit-box-orient': 'vertical', '-webkit-line-clamp': '5' })}>test</p>
<p className={css({ 'display': '-webkit-box', '-webkit-box-orient': 'vertical', '-webkit-line-clamp': '5' })}>test</p>
throws in the build step
error TS2345: Argument of type '{ display: "-webkit-box"; '-webkit-box-orient': string; '-webkit-line-clamp': string; }' is not assignable to parameter of type 'false | SystemStyleObject | null | undefined'.
Object literal may only specify known properties, and ''-webkit-box-orient'' does not exist in type 'SystemStyleObject'.
error TS2345: Argument of type '{ display: "-webkit-box"; '-webkit-box-orient': string; '-webkit-line-clamp': string; }' is not assignable to parameter of type 'false | SystemStyleObject | null | undefined'.
Object literal may only specify known properties, and ''-webkit-box-orient'' does not exist in type 'SystemStyleObject'.
Any ideas. I cant find anything in their docs
2 replies
TTCTheo's Typesafe Cult
Created by dzenda on 3/1/2024 in #questions
server action && from state && files
when i log the value i get null anyone more familiar with action knows why ???
import { api } from "~/trpc/server";
export default async function ImportPage() {
async function fromAFile(formData: FormData) {
"use server";
console.log(formData.get("file"));
/* const test = await api.events.addEventsFromIcal.mutate({
data: formData.get("file")?.toString() ?? "",
});*/
}
return (

<form action={fromAFile} className="rounded bg-gray-200 px-3 py-1">
<label className="flex flex-row items-center gap-2 text-base text-gray-950">
<span className="w-full">From a file</span>
<input
className="opacity-0"
type="file"
id="file"
accept=".ics"
required
/>
</label>
<button
type="submit"
className="w-full rounded-lg bg-blue-600 p-2 text-black"
>
import
</button>
</form>

);
}
import { api } from "~/trpc/server";
export default async function ImportPage() {
async function fromAFile(formData: FormData) {
"use server";
console.log(formData.get("file"));
/* const test = await api.events.addEventsFromIcal.mutate({
data: formData.get("file")?.toString() ?? "",
});*/
}
return (

<form action={fromAFile} className="rounded bg-gray-200 px-3 py-1">
<label className="flex flex-row items-center gap-2 text-base text-gray-950">
<span className="w-full">From a file</span>
<input
className="opacity-0"
type="file"
id="file"
accept=".ics"
required
/>
</label>
<button
type="submit"
className="w-full rounded-lg bg-blue-600 p-2 text-black"
>
import
</button>
</form>

);
}
4 replies