Skip to content

Commit

Permalink
Add Module props and update Module.Expandable props (pinterest/gestal…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Kim committed Mar 6, 2021
1 parent 11fab34 commit bf3bfdc
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions types/gestalt/index.d.ts
@@ -1,4 +1,4 @@
// Type definitions for gestalt 16.5
// Type definitions for gestalt 16.7
// Project: https://github.com/pinterest/gestalt, https://pinterest.github.io/gestalt
// Definitions by: Nicolás Serrano Arévalo <https://github.com/serranoarevalo>
// Josh Gachnang <https://github.com/joshgachnang>
Expand Down Expand Up @@ -855,7 +855,18 @@ export interface ModalProps {
* Module Props Interface
* https://gestalt.netlify.app/Module
*/
export interface ModuleProps {
id: string;
icon?: Icons;
iconAccessibilityLabel?: string;
title?: string;
type: "error" | "info";
}

/**
* Module.Expandable Props Interface
* https://gestalt.netlify.app/Module
*/
export interface ModuleExpandableProps {
accessibilityCollapseLabel: string;
accessibilityExpandLabel: string;
Expand All @@ -868,6 +879,8 @@ export interface ModuleExpandableProps {
iconAccessibilityLabel?: string;
children?: React.ReactNode;
}>;
expandedIndex?: number | null;
onExpandedChange?: (expandedIndex: number | null) => void;
}

/**
Expand Down Expand Up @@ -1488,7 +1501,7 @@ export const Link: ReactForwardRef<HTMLAnchorElement, LinkProps>;
export class Mask extends React.Component<MaskProps, any> {}
export class Masonry extends React.Component<MasonryProps, any> {}
export const Modal: ReactForwardRef<HTMLDivElement, ModalProps>;
export class Module extends React.Component<{}, any> {
export class Module extends React.Component<ModuleProps, any> {
static Expandable: React.FC<ModuleExpandableProps>;
}
export class Pog extends React.Component<PogProps, any> {}
Expand Down

0 comments on commit bf3bfdc

Please sign in to comment.