diff options
Diffstat (limited to 'src/components/atoms/layout/article/article.tsx')
| -rw-r--r-- | src/components/atoms/layout/article/article.tsx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/components/atoms/layout/article/article.tsx b/src/components/atoms/layout/article/article.tsx new file mode 100644 index 0000000..8611e20 --- /dev/null +++ b/src/components/atoms/layout/article/article.tsx @@ -0,0 +1,23 @@ +import { + type ForwardRefRenderFunction, + type HTMLAttributes, + type ReactNode, + forwardRef, +} from 'react'; + +export type ArticleProps = HTMLAttributes<HTMLElement> & { + /** + * The article contents. + */ + children: ReactNode; +}; + +const ArticleWithRef: ForwardRefRenderFunction<HTMLElement, ArticleProps> = ( + props, + ref +) => <article {...props} ref={ref} />; + +/** + * Article component. + */ +export const Article = forwardRef(ArticleWithRef); |
