mirror of
				https://github.com/aleleba/react-list-ui-library.git
				synced 2025-10-30 13:39:30 -06:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			479 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			479 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import React, { FC } from "react";
 | |
| import "./style.scss";
 | |
| 
 | |
| type TCardProps = {
 | |
|   /**
 | |
|    * Is this the title of the card.
 | |
|    */
 | |
|   title?: string,
 | |
|   /**
 | |
|    * Is this the child component of the card. (The content)
 | |
|    */
 | |
|   children?: JSX.Element,
 | |
| };
 | |
| 
 | |
| const Card: FC<TCardProps> = ({ title, children}) => {
 | |
|   return (
 | |
|     <div className="Card">
 | |
|       <div className="Title">{title}</div>
 | |
| 
 | |
|       <div className="Content">{children}</div>
 | |
|     </div>
 | |
|   );
 | |
| };
 | |
| 
 | |
| export { Card, TCardProps } |