#101 余白追加

This commit is contained in:
2025-09-21 23:30:33 +09:00
parent cafd55bf22
commit 537c94a34b
2 changed files with 8 additions and 3 deletions
+2
View File
@@ -62,12 +62,14 @@ export default (({ post, onSave }: Props) => {
<Label></Label> <Label></Label>
<div className="my-1"> <div className="my-1">
<DateTimeField <DateTimeField
className="mr-2"
value={originalCreatedFrom ?? undefined} value={originalCreatedFrom ?? undefined}
onChange={setOriginalCreatedFrom}/> onChange={setOriginalCreatedFrom}/>
</div> </div>
<div className="my-1"> <div className="my-1">
<DateTimeField <DateTimeField
className="mr-2"
value={originalCreatedBefore ?? undefined} value={originalCreatedBefore ?? undefined}
onChange={setOriginalCreatedBefore}/> onChange={setOriginalCreatedBefore}/>
@@ -1,5 +1,7 @@
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { cn } from '@/lib/utils'
import type { FC } from 'react' import type { FC } from 'react'
@@ -19,10 +21,11 @@ const toDateTimeLocalValue = (d: Date) => {
type Props = { type Props = {
value?: string value?: string
onChange?: (isoUTC: string | null) => void } onChange?: (isoUTC: string | null) => void
className?: string }
export default (({ value, onChange }: Props) => { export default (({ value, onChange, className }: Props) => {
const [local, setLocal] = useState ('') const [local, setLocal] = useState ('')
useEffect (() => { useEffect (() => {
@@ -31,7 +34,7 @@ export default (({ value, onChange }: Props) => {
return ( return (
<input <input
className="border rounded p-2" className={cn ('border rounded p-2', className)}
type="datetime-local" type="datetime-local"
step={1} step={1}
value={local} value={local}