diff --git a/src/components/Card.tsx b/src/components/Card.tsx new file mode 100644 index 0000000..2f31835 --- /dev/null +++ b/src/components/Card.tsx @@ -0,0 +1,35 @@ +import React from "react"; + +/** + * [*]This is a container which accept children. + * + * [*] style is a conditional prop, when you pass style, you can cusomize the card: + * style={{ anything: "anything" }} + * + * [*] A good example will be: + * +

This is a child

+
+ */ +export interface CardProps { + style?: React.CSSProperties; + children?: React.ReactNode; +} + +const Card = ({ style, children }: CardProps) => { + return ( +
+ {children} +
+ ); +}; + +export default Card;