Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scoutingapp/src/components/inputs/GridIncrementDecrement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function GridIncrementDecrement(props: ComponentSetup) {
{props.text}
</label>

<div className={`grid grid-cols-${props.options?.length} gap-3`}>
<div className={`grid grid-rows-2 gap-3`} style={{ gridTemplateColumns: `repeat(${props.options?.length}, minmax(0, 1fr))` }}>
{props.options?.map((option: string, idx) => {
const [raw, label] = option.split("|")
const n = Number(raw)
Expand All @@ -26,7 +26,7 @@ function GridIncrementDecrement(props: ComponentSetup) {
<button
key={idx}
onClick={() => setCount(s => Math.max(0, s - n))}
className={`h-14 rounded-lg text-lg text-black font-semibold
className={`h-14 rounded-lg text-lg text-black
bg-[#FDE7E7] hover:opacity-90 transition`}
>
- {label}
Expand All @@ -42,7 +42,7 @@ function GridIncrementDecrement(props: ComponentSetup) {
<button
key={idx}
onClick={() => setCount(s => Math.max(0, s + n))}
className={`h-14 rounded-lg text-lg text-black font-semibold
className={`h-14 rounded-lg text-lg text-black
bg-[#E2F8E3] hover:opacity-90 transition`}
>
+ {label}
Expand Down
Loading