Skip to content

Commit

Permalink
feat: add input file styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ainunns committed Oct 9, 2024
1 parent d542819 commit 746490b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export default {
// Lint & Prettify TS and JS files
"**/*.(ts|tsx|js)": () => [`pnpm lint:write `, `pnpm format:write`],
// Type check TypeScript files
"**/*.(ts|tsx)": () => "pnpm check",
"**/*.(ts|tsx)": () => "pnpm typecheck",

// Lint & Prettify TS and JS files
"**/*.(ts|tsx|js)": () => [`pnpm lint`, `pnpm format:write`],
};
1 change: 1 addition & 0 deletions resources/js/Components/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { InputHTMLAttributes } from "react";
import Input from "@/Components/Input";

export default function Checkbox({
className = "",
Expand Down
3 changes: 2 additions & 1 deletion resources/js/Components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export default forwardRef(function Input(
"disabled:cursor-not-allowed disabled:border-gray-300 disabled:bg-gray-100 disabled:focus:border-gray-300 disabled:focus:ring-0",
"read-only:cursor-not-allowed read-only:border-gray-300 read-only:bg-gray-100 read-only:focus:border-gray-300 read-only:focus:ring-0",
"invalid:border-red-500 invalid:focus:border-red-500 invalid:focus:ring-red-500",
+className,
"file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-neutral-700 file:cursor-pointer",
className,
)}
ref={localRef}
/>
Expand Down

0 comments on commit 746490b

Please sign in to comment.