💄 fixed table design
Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
		
							parent
							
								
									a604592622
								
							
						
					
					
						commit
						d9c11d4229
					
				
					 2 changed files with 19 additions and 12 deletions
				
			
		|  | @ -4,6 +4,7 @@ | ||||||
| 
 | 
 | ||||||
| :root { | :root { | ||||||
|   --bg: #27374d; |   --bg: #27374d; | ||||||
|  |   --bg2: #1a2533; | ||||||
|   --text-1: #dde6ed; |   --text-1: #dde6ed; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -11,3 +12,7 @@ html { | ||||||
|   background-color: var(--bg); |   background-color: var(--bg); | ||||||
|   color: var(--text-1); |   color: var(--text-1); | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | .card { | ||||||
|  |   background-color: var(--bg2); | ||||||
|  | } | ||||||
|  |  | ||||||
							
								
								
									
										12
									
								
								src/App.tsx
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/App.tsx
									
										
									
									
									
								
							|  | @ -34,9 +34,10 @@ function App() { | ||||||
| 
 | 
 | ||||||
|   return ( |   return ( | ||||||
|     <> |     <> | ||||||
|       <q.div> |       <q.div className="flex flex-col justify-center items-center mx-auto w-3/4"> | ||||||
|         <q.div> |         <q.div className="flex flex-col w-full items-center"> | ||||||
|           <q.h1>All movies</q.h1> |           <q.h1>All movies</q.h1> | ||||||
|  |           <q.div className="flex"> | ||||||
|             {!loading && totalPages && ( |             {!loading && totalPages && ( | ||||||
|               <Pagination |               <Pagination | ||||||
|                 currentPage={currentPage} |                 currentPage={currentPage} | ||||||
|  | @ -45,17 +46,18 @@ function App() { | ||||||
|               /> |               /> | ||||||
|             )} |             )} | ||||||
|           </q.div> |           </q.div> | ||||||
|  |         </q.div> | ||||||
|         {!loading && movies ? ( |         {!loading && movies ? ( | ||||||
|           <q.div> |           <q.div> | ||||||
|             <q.table> |             <q.table className="border-separate border-spacing-y-5"> | ||||||
|               <q.tr> |               <q.tr> | ||||||
|                 <q.th>Poster</q.th> |                 <q.th>Poster</q.th> | ||||||
|                 <q.th>Title</q.th> |                 <q.th>Title</q.th> | ||||||
|                 <q.th>Year</q.th> |                 <q.th>Year</q.th> | ||||||
|               </q.tr> |               </q.tr> | ||||||
|               {movies.map((movie: any) => ( |               {movies.map((movie: any) => ( | ||||||
|                 <q.tr> |                 <q.tr className="card rounded-md"> | ||||||
|                   <q.td> |                   <q.td className="p-2"> | ||||||
|                     <q.img src={movie.Poster} alt={movie.Title} width="100" /> |                     <q.img src={movie.Poster} alt={movie.Title} width="100" /> | ||||||
|                   </q.td> |                   </q.td> | ||||||
|                   <q.td>{movie.Title}</q.td> |                   <q.td>{movie.Title}</q.td> | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 haraldnilsen
						haraldnilsen