Testing and types updates (#39657)
This commit is contained in:
29 files changed
+263
-191
No files matched your search
@@ -3,14 +3,14 @@ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
import type { OmitUnion } from '@/mastodon/utils/types';
|
||||
import type { Merge } from 'type-fest';
|
||||
|
||||
import { Icon } from '../icon';
|
||||
import type { IconProp } from '../icon';
|
||||
|
||||
import classes from './styles.module.css';
|
||||
|
||||
export type MiniCardProps = OmitUnion<
|
||||
export type MiniCardProps = Merge<
|
||||
ComponentPropsWithoutRef<'div'>,
|
||||
{
|
||||
label: ReactNode;
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { ComponentPropsWithoutRef, Key } from 'react';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
import type { OmitUnion } from '@/mastodon/utils/types';
|
||||
import type { Merge } from 'type-fest';
|
||||
|
||||
import { MiniCard } from '.';
|
||||
import type { MiniCardProps as BaseCardProps } from '.';
|
||||
@@ -19,7 +19,7 @@ interface MiniCardListProps {
|
||||
|
||||
export const MiniCardList = forwardRef<
|
||||
HTMLDListElement,
|
||||
OmitUnion<ComponentPropsWithoutRef<'dl'>, MiniCardListProps>
|
||||
Merge<ComponentPropsWithoutRef<'dl'>, MiniCardListProps>
|
||||
>(({ cards = [], className, children, ...props }, ref) => {
|
||||
if (!cards.length) {
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user