({
side,
onClick,
}: {
side: ScrollSide;
onClick: () => void;
})
| 136 | type ScrollSide = 'before' | 'after'; |
| 137 | |
| 138 | const MetricsArrow = ({ |
| 139 | side, |
| 140 | onClick, |
| 141 | }: { |
| 142 | side: ScrollSide; |
| 143 | onClick: () => void; |
| 144 | }): ReactElement => { |
| 145 | const isAfter = side === 'after'; |
| 146 | |
| 147 | return ( |
| 148 | <div |
| 149 | className={classNames( |
| 150 | 'pointer-events-none absolute inset-y-0 z-1 flex w-16 items-center from-background-default via-background-default to-transparent', |
| 151 | isAfter |
| 152 | ? 'right-0 justify-end bg-gradient-to-l pr-2' |
| 153 | : 'left-0 justify-start bg-gradient-to-r pl-2', |
| 154 | )} |
| 155 | > |
| 156 | <Button |
| 157 | type="button" |
| 158 | tabIndex={-1} |
| 159 | aria-hidden |
| 160 | className="pointer-events-auto" |
| 161 | variant={ButtonVariant.Float} |
| 162 | size={ButtonSize.XSmall} |
| 163 | icon={<ArrowIcon className={isAfter ? 'rotate-90' : '-rotate-90'} />} |
| 164 | onClick={onClick} |
| 165 | /> |
| 166 | </div> |
| 167 | ); |
| 168 | }; |
| 169 | |
| 170 | /** The totals scroll sideways on phones: an arrow shows on the side with more */ |
| 171 | const MetricsRow = ({ children }: { children: ReactNode }): ReactElement => { |
nothing calls this directly
no outgoing calls
no test coverage detected