No additional libraryListens to keydown eventsSupports arrow navigationFormats date valuesOptimizes mobile keyboard Get StartedInstall shadcn/ui incl. the Input component (twelve-hour clocks also need the Select component)Copy & paste time-picker-utils.tsxCopy & paste time-picker-input.tsxDefine your TimePicker component (e.g. time-picker-demo.tsx)
<div class="card"> <calendar-range months="2"> <svg aria-label="Previous" slot="previous" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" > <path d="M15.75 19.5 8.25 12l7.5-7.5"></path> </svg> <svg aria-label="Next" slot="next" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" > <path d="m8.25 4.5 7.5 7.5-7.5 7.5"></path> </svg> <calendar-month></calendar-month> <calendar-month offset=
ミツカリのたなしゅん(@tanashun_dev)です。 弊社で提供しているサービスの一部のアクションでドラッグアンドドロップで画面上の要素の並び替えをする機能があります。 この実装にはdnd-kitというライブラリを使っています。 dndkit.com ライブラリのおかげで実装自体はそう難しいものではありませんでしたが、意図しない変更やライブラリのアップデートによってドラッグアンドドロップの動作を壊してしまう可能性が今後つきまといます。 リリースのたびにそれをチェックするのは工数ももったいないです。 ドラッグアンドドロップが正常にできているかどうかをコードレベルで保証するために単体テストを書くべきですね。 前提として、弊社ではfrontendにNext.jsを使っていて、その単体テストはJestで書いています。 まずはJestでテストを書こうとしました。 しかし、結論から言うとJestで
React Router の Server Components 対応はプレビュー版で提供されています。今後変更される可能性がありますので、注意してください。 React Router はプレビュー版として Server Components に対応しました。これにより以下のような機能が追加されました。 loader や actions を使用してデータを返す際にコンポーネント渡せるようになる Server Components ファーストのサーバーコンポーネントルート "use server" ディレクティブを使用したサーバー関数のサポート この記事では React Router の Server Components 対応を実際に試してみます。 React Router プロジェクトの作成 まずは React Router のサーバーコンポーネント対応はプレビュー版で提供されている機能
Jokester began sneaking into the castle in the middle of the night and leaving jokes all over the place: under the king's pillow, in his soup, even in the royal toilet. The king was furious, but he couldn't seem to stop Jokester. And then, one day, the people of the kingdom discovered that the jokes left by Jokester were so funny that they couldn't help but laugh. And once they started laughing, t
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く