File tree Expand file tree Collapse file tree
pods/embalse-provincia-list Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,12 +2,19 @@ import React from "react";
22
33interface Props {
44 children ?: React . ReactNode ;
5+ className ?: string ;
56}
67
78export const Card : React . FC < Props > = ( props : Props ) => {
8- const { children } = props ;
9+ const { children, className } = props ;
910 return (
10- < div className = "bg-base-100 m-8 flex flex-col gap-6 rounded-2xl p-4" >
11+ < div
12+ className = {
13+ className
14+ ? className
15+ : "bg-base-100 m-8 flex flex-col gap-6 rounded-2xl p-4"
16+ }
17+ >
1118 { children }
1219 </ div >
1320 ) ;
Original file line number Diff line number Diff line change @@ -5,18 +5,20 @@ import Link from "next/link";
55
66export const EmbalseProvinciaList : React . FC = ( ) => {
77 return (
8- < Card >
9- < h2 > Embalses por provincias</ h2 >
10- < div className = "flex flex-col gap-4" >
11- { PROVINCIAS . map ( ( { id, name } ) => (
12- < Link
13- key = { id }
14- href = { `/embalse-provincia/${ id } ` }
15- className = "link-accessible"
16- >
17- { name }
18- </ Link >
19- ) ) }
8+ < Card className = "mx-auto w-full pt-6 pr-4 pb-6 pl-4 md:max-w-[900px] md:p-8" >
9+ < div className = "bg-base-100 rounded-2xl p-6" >
10+ < h2 > Embalses por provincias</ h2 >
11+ < div className = "grid grid-cols-1 gap-4 p-6 sm:grid-cols-2 md:grid-cols-3" >
12+ { PROVINCIAS . map ( ( { id, name } ) => (
13+ < Link
14+ key = { id }
15+ href = { `/embalse-provincia/${ id } ` }
16+ className = "link-accessible"
17+ >
18+ { name }
19+ </ Link >
20+ ) ) }
21+ </ div >
2022 </ div >
2123 </ Card >
2224 ) ;
You can’t perform that action at this time.
0 commit comments