Skip to content

Commit

Permalink
Merge pull request #257 from h8570rg/develop
Browse files Browse the repository at this point in the history
Release 0.1.3
  • Loading branch information
h8570rg authored Dec 29, 2024
2 parents 109dac5 + 7dc7c6a commit b04b914
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function ChipForm({ match }: { match: Match }) {
}, [chipModal, success]);

return (
<form action={formAction}>
<form className="contents" action={formAction}>
<ModalBody>
<ul className="space-y-1">
{fields.map((field, index) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ export function ChipModalController({
const { chipModal } = useMatchContext();

return (
<Modal {...chipModal.bind} hideCloseButton>
<Modal
{...chipModal.bind}
hideCloseButton
placement="bottom"
scrollBehavior="inside"
className="max-h-[calc(100%_-_2rem)]"
>
<ModalContent>{children}</ModalContent>
</Modal>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function GameForm({ match }: { match: Match }) {
}, [gameModal, success]);

return (
<form action={formAction}>
<form className="contents" action={formAction}>
<ModalBody>
<ul className="space-y-1">
<DndContext onDragEnd={handleDragEnd}>
Expand All @@ -91,7 +91,7 @@ export function GameForm({ match }: { match: Match }) {
return (
<SortableItem key={field.id} id={field.id}>
{({ attributes, listeners }) => (
<div className="flex touch-none items-center gap-1">
<div className="flex items-center gap-1">
<Controller
control={control}
name={`players.${index}.id`}
Expand All @@ -110,7 +110,7 @@ export function GameForm({ match }: { match: Match }) {
classNames={{
base: "basis-[160px] shrink-0",
input:
"text-right placeholder:text-default-400 text-medium",
"text-right placeholder:text-default-400",
}}
size="md"
type="number"
Expand Down Expand Up @@ -156,7 +156,7 @@ export function GameForm({ match }: { match: Match }) {
)}
/>
<div
className="flex w-6 shrink-0 items-center"
className="flex w-6 shrink-0 touch-none items-center"
{...attributes}
{...listeners}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ export function GameModalController({
const { gameModal } = useMatchContext();

return (
<Modal {...gameModal.bind} hideCloseButton placement="bottom">
<Modal
{...gameModal.bind}
hideCloseButton
placement="bottom"
scrollBehavior="inside"
className="max-h-[calc(100%_-_2rem)]"
>
<ModalContent>{children}</ModalContent>
</Modal>
);
Expand Down
15 changes: 13 additions & 2 deletions components/Input/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
"use client";

import { Input as NextUiInput, InputProps } from "@nextui-org/react";
import classNames from "classnames";
import { forwardRef } from "react";

export const Input = forwardRef<
HTMLInputElement,
Omit<InputProps, "isInvalid">
>(function Input(props, ref) {
return <NextUiInput {...props} ref={ref} isInvalid={!!props.errorMessage} />;
>(function Input({ classNames: propsClassNames, ...props }, ref) {
return (
<NextUiInput
classNames={{
...propsClassNames,
input: classNames("text-medium", propsClassNames?.input), // ios safariで拡大されるのを防ぐ
}}
{...props}
ref={ref}
isInvalid={!!props.errorMessage}
/>
);
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jankiroku",
"version": "0.1.2",
"version": "0.1.3",
"description": "",
"main": "index.js",
"engines": {
Expand Down

0 comments on commit b04b914

Please sign in to comment.