-
Notifications
You must be signed in to change notification settings - Fork 119
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
7efdcc8
commit a057f18
Showing
4 changed files
with
40 additions
and
38 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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
'use client' | ||
import { FC, ReactNode } from 'react' | ||
import { forwardRef, HTMLProps } from 'react' | ||
import { cn } from '../../helpers/cn' | ||
import { emptyTheme } from './theme' | ||
|
||
export interface DescriptionProps { | ||
className?: string | ||
children?: ReactNode | ||
} | ||
export const Description = forwardRef<HTMLParagraphElement, HTMLProps<HTMLParagraphElement>>( | ||
({ children, ...props }, ref) => { | ||
const { description } = emptyTheme | ||
return ( | ||
<p {...props} ref={ref} className={cn(description.base, props.className)}> | ||
{children} | ||
</p> | ||
) | ||
}, | ||
) | ||
|
||
export const Description: FC<DescriptionProps> = ({ children, className }) => { | ||
const { description } = emptyTheme | ||
return <p className={cn(description.base, className)}>{children}</p> | ||
} | ||
Description.displayName = 'Empty.Description' |
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
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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
'use client' | ||
import { FC, ReactNode } from 'react' | ||
import { forwardRef, HTMLProps } from 'react' | ||
import { cn } from '../../helpers/cn' | ||
|
||
export interface ImageProps { | ||
className?: string | ||
children?: ReactNode | ||
} | ||
export const Image = forwardRef<HTMLDivElement, HTMLProps<HTMLDivElement>>(({ children, ...props }, ref) => { | ||
return ( | ||
<div {...props} ref={ref} className={cn(props.className)}> | ||
{children} | ||
</div> | ||
) | ||
}) | ||
|
||
export const Image: FC<ImageProps> = ({ children, className }) => { | ||
return <div className={cn(className)}>{children}</div> | ||
} | ||
Image.displayName = 'Empty.Image' |
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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
'use client' | ||
import { FC, ReactNode } from 'react' | ||
import { forwardRef, HTMLProps } from 'react' | ||
import { cn } from '../../helpers/cn' | ||
import { emptyTheme } from './theme' | ||
|
||
export interface TitleProps { | ||
className?: string | ||
children?: ReactNode | ||
} | ||
|
||
export const Title: FC<TitleProps> = ({ children, className }) => { | ||
export const Title = forwardRef<HTMLHeadingElement, HTMLProps<HTMLHeadingElement>>(({ children, ...props }, ref) => { | ||
const { title } = emptyTheme | ||
return <h1 className={cn(title.base, className)}>{children}</h1> | ||
} | ||
return ( | ||
<h1 {...props} ref={ref} className={cn(title.base, props.className)}> | ||
{children} | ||
</h1> | ||
) | ||
}) | ||
|
||
Title.displayName = 'Empty.Title' |