Skip to content

Commit

Permalink
Update radix
Browse files Browse the repository at this point in the history
  • Loading branch information
constantgillet committed Apr 28, 2024
1 parent 8dbee2a commit 4aa1f88
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 38 deletions.
8 changes: 4 additions & 4 deletions app/components/Form.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Button, TextFieldInput } from "@radix-ui/themes";
import { Button, TextField } from "@radix-ui/themes";
import { ButtonProps } from "node_modules/@radix-ui/themes/dist/esm/components/button";
import { TextFieldInputProps } from "node_modules/@radix-ui/themes/dist/esm/components/text-field";
import { useField, useIsSubmitting } from "remix-validated-form";
import { css } from "styled-system/css";
import { Spinner } from "./Spinner";
import { RootProps } from "@radix-ui/themes/src/components/text-field.js";

type FormInputProps = TextFieldInputProps & {
type FormInputProps = RootProps & {
name: string;
};

Expand All @@ -19,7 +19,7 @@ export const FormInput = ({ name, ...props }: FormInputProps) => {

return (
<div>
<TextFieldInput
<TextField.Root
{...textFieldInputProps}
color={error ? "red" : props.color}
/>
Expand Down
6 changes: 3 additions & 3 deletions app/components/PropertyTextField.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { TextField, Tooltip } from "@radix-ui/themes";
import { Icon } from "./Icon";
import { css } from "styled-system/css";
import { TextFieldInputProps } from "node_modules/@radix-ui/themes/dist/esm/components/text-field";
import { RootProps } from "node_modules/@radix-ui/themes/dist/esm/components/text-field";
import { forwardRef } from "react";

//Get default props of input
type PropertyTextFieldProps = TextFieldInputProps & {
type PropertyTextFieldProps = RootProps & {
hasVariable: boolean;
icon?: React.ReactNode;
};
Expand All @@ -19,7 +19,7 @@ export const PropertyTextField = forwardRef(function PropertyTextFieldComponent(
return (
<TextField.Root>
{icon ? <TextField.Slot>{icon}</TextField.Slot> : null}
<TextField.Input ref={ref} {...inputProps} />
<TextField.Root ref={ref} {...inputProps} />
{hasVariable ? (
<TextField.Slot
style={{
Expand Down
158 changes: 128 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@aws-sdk/client-s3": "^3.515.0",
"@lucia-auth/adapter-prisma": "^4.0.0",
"@prisma/client": "^5.9.1",
"@radix-ui/themes": "^2.0.2",
"@radix-ui/themes": "^3.0.2",
"@redux-devtools/extension": "^3.3.0",
"@remix-run/css-bundle": "^2.4.0",
"@remix-run/express": "^2.6.0",
Expand Down

0 comments on commit 4aa1f88

Please sign in to comment.