@patreon/studio
Version:
Patreon Studio Design System
38 lines (37 loc) • 1.13 kB
TypeScript
import type { ColorToken } from '~/types/tokens';
import type { ValueOrResponsive } from '~/utilities/opaque-responsive';
export interface CollapseProps {
/**
* The collapsible content.
*/
children: React.ReactNode;
/**
* Sets the height (in pixels) of the content wrapper when collapsed.
*/
collapsedHeight?: ValueOrResponsive<number>;
/**
* Superimposes a gradient fade in front of the bottom of the content
* while collapsed, producing a fading effect. Needs to be used in
* conjunction with `collapsedHeight`.
*/
fadeBottom?: boolean;
/**
* Sets to the background color of the collapsible content's parent to
* achieve the desired fading effect.
*/
fadeColor?: ColorToken;
/**
* Sets the height (in pixels) of the fade.
*/
fadeHeight?: number;
/**
* Sets the id of the outermost element.
*/
id?: string;
/**
* When true, content height is set to `collapsedHeight`.
* When false, content is fully expanded.
* Collapsing and expanding is animated.
*/
isCollapsed: boolean;
}