Skip to content

Commit

Permalink
added cardsPerRowControl file
Browse files Browse the repository at this point in the history
  • Loading branch information
dsoskey committed Apr 25, 2024
1 parent f6b443e commit 75bbd59
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/ui/component/cardsPerRowControl.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from "react";
import { Setter } from '../../types'

export interface CardsPerRowControlProps {
cardsPerRow: number
setCardsPerRow: Setter<number>
}

export function CardsPerRowControl({cardsPerRow, setCardsPerRow}: CardsPerRowControlProps) {

return <div>
<label>
<strong>cards per row: </strong>
<select value={cardsPerRow} onChange={e => setCardsPerRow(parseInt(e.target.value))}>
<option value={4}>4</option>
<option value={6}>6</option>
<option value={8}>8</option>
<option value={12}>12</option>
<option value={16}>16</option>
</select>
</label>
</div>;
}

0 comments on commit 75bbd59

Please sign in to comment.