aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/layout/aside/aside.tsx
blob: 92a9bf2fa1ed5babeecc9215f7f0de8c47176a6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import {
  type ForwardRefRenderFunction,
  type HTMLAttributes,
  type ReactNode,
  forwardRef,
} from 'react';

export type AsideProps = HTMLAttributes<HTMLElement> & {
  /**
   * The aside contents.
   */
  children: ReactNode;
};

const AsideWithRef: ForwardRefRenderFunction<HTMLElement, AsideProps> = (
  props,
  ref
) => <aside {...props} ref={ref} />;

/**
 * Aside component.
 */
export const Aside = forwardRef(AsideWithRef);