import type { CSSProperties } from 'react'; import React, { Fragment, useMemo } from 'react'; import { SVGProps } from './SVG'; export const textStyle: CSSProperties = { textAnchor: 'middle', fontSize: 'inherit', fill: 'currentColor', } export interface LablesWeekProps extends React.SVGProps { weekLabels: SVGProps['weekLabels']; rectSize: SVGProps['rectSize']; space: SVGProps['space']; topPad: number; } export const LabelsWeek = ({ weekLabels = [], rectSize = 0, topPad = 0, space = 0 }: LablesWeekProps) => useMemo( () => ( {[...Array(7)].map((_, idx) => { if (weekLabels && weekLabels[idx]) { return ( {weekLabels[idx]} ); } return null; })} ), [rectSize, space, topPad, weekLabels], );