goobs-frontend
Version:
A comprehensive React-based libary for building modern web applications
42 lines • 2.23 kB
TypeScript
import { default as React } from 'react';
export interface SlideStyles {
/** Theme variant: 'light' (default), 'dark', or 'sacred' — changes only the default transition timing. */
theme?: 'light' | 'dark' | 'sacred';
/** Visibility toggle: false slides out, anything else (including unset) shows the content. */
in?: boolean;
/** Slide duration in milliseconds; wins over transitionDuration. */
timeout?: number;
/** Direction the content slides in from (default 'up'). */
direction?: 'up' | 'down' | 'left' | 'right';
/** Full CSS transition shorthand; replaces the computed transition verbatim. */
transition?: string;
/** Slide duration as a CSS time (e.g. '0.3s'); superseded by timeout. */
transitionDuration?: string;
/** Transition delay. */
transitionDelay?: string;
/** Transition timing function. */
transitionTimingFunction?: string;
/** Freezes the transition (`transition: none` via data-disabled). */
disabled?: boolean;
}
export interface SlideProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'style'> {
/** The content to be wrapped with slide transition. */
children: React.ReactNode;
/** Comprehensive styling options including theme, animation timing, direction, and transition properties. */
styles?: SlideStyles;
}
/**
* A slide transition component with theming support for smooth transform animations.
* Supports sliding from different directions: up, down, left, right.
*
* Theme (light/dark/sacred) only changes the default transition timing and is
* expressed as `data-theme`. Direction is expressed as `data-direction` and the
* hidden→visible toggle is the `.in` class — all transform/timing lives in
* Slide.module.css. Caller-supplied timing overrides (timeout / transitionDuration
* / transitionTimingFunction / transition / transitionDelay) remain in JS and are
* forwarded as CSS custom properties (or inline transition for the full-shorthand
* `transition` override), preserving exact parity with the old getSlideStyles.
*/
declare const Slide: React.ForwardRefExoticComponent<SlideProps & React.RefAttributes<HTMLDivElement>>;
export default Slide;
//# sourceMappingURL=index.d.ts.map