Skip to content

Commit

Permalink
fix: Pagination and Select prop types (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
tassoevan committed Apr 20, 2021
1 parent 4172c18 commit 0461f41
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/fuselage/fuselage.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
type FontScale = 'h1' | 's1' | 's2' | 'p1' | 'p2' | 'c1' | 'c2' | 'micro';

declare module '@rocket.chat/fuselage' {
import type { css } from '@rocket.chat/css-in-js';
import { Placements } from '@rocket.chat/fuselage-hooks';
Expand All @@ -16,8 +18,6 @@ declare module '@rocket.chat/fuselage' {
SVGAttributes,
} from 'react';

type FontScale = 'h1' | 's1' | 's2' | 'p1' | 'p2' | 'c1' | 'c2' | 'micro';

type BoxProps = PropsWithChildren<{
is?: ElementType;
className?:
Expand Down Expand Up @@ -313,7 +313,7 @@ declare module '@rocket.chat/fuselage' {
title: string;
icon: string;
};
action: Function;
action: () => void;
};
};
optionWidth?: BoxProps['width'];
Expand Down Expand Up @@ -371,6 +371,7 @@ declare module '@rocket.chat/fuselage' {
type PaginationProps = BoxProps & {
count: number;
current?: number;
divider?: boolean;
itemsPerPage?: 25 | 50 | 100;
itemsPerPageLabel?: () => string;
showingResultsLabel?: (props: {
Expand Down Expand Up @@ -463,9 +464,10 @@ declare module '@rocket.chat/fuselage' {
export const Scrollable: ForwardRefExoticComponent<ScrollableProps>;

type SelectOptions = [string, string][];
type SelectProps = BoxProps & {
type SelectProps = Omit<BoxProps, 'onChange'> & {
error?: string;
options: SelectOptions;
onChange: (value: string) => void;
};
export const Select: ForwardRefExoticComponent<SelectProps>;

Expand All @@ -474,4 +476,6 @@ declare module '@rocket.chat/fuselage' {
size?: 'small' | 'large';
} & Omit<AllHTMLAttributes<HTMLElement>, 'size'>;
export const StatusBullet: FC<StatusBulletProps>;

export * from './dist/index.d';
}

0 comments on commit 0461f41

Please sign in to comment.