generated from nl-design-system/example
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a24888b
commit 4934ad8
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// export const Card = () => ( | ||
// <section className="frameless-card-section"> | ||
// <div className="frameless-card-group"> | ||
// <div className="frameless-card"></div> | ||
// </div> | ||
// </section> | ||
// ); | ||
|
||
import clsx from 'clsx'; | ||
import { HTMLAttributes, PropsWithChildren } from 'react'; | ||
import '@frameless/components-css/card/index.scss'; | ||
|
||
// ensures that this component is flexible, can accept standard HTML attributes, and conditionally applies styles based on the background prop. | ||
interface CardIllustrationProps extends HTMLAttributes<HTMLElement> { | ||
background?: boolean; | ||
} | ||
|
||
export const CardIllustrations = ({ | ||
background, | ||
children, | ||
className, | ||
...restProps | ||
}: PropsWithChildren<CardIllustrationProps>) => ( | ||
<div | ||
{...restProps} | ||
className={clsx(['frameless-card-test'], background, ['card__illustration--background'], className)} | ||
> | ||
{children} | ||
</div> | ||
); | ||
|
||
export const CardContent = (props: PropsWithChildren<HTMLAttributes<HTMLElement>>) => ( | ||
<div className={clsx(['frameless-card-content'])} {...props} /> | ||
); |