dynascale
Version:
   
38 lines (34 loc) • 911 B
TypeScript
import { JSX } from 'react/jsx-runtime';
/**
* A component that scales its children to always fit
* within its container while maintaining aspect ratio.
* @returns
*/
export declare const Dynascale: ({ defaultScale, minScale, margin, className, debug, children }: ScalingComponentProps) => JSX.Element;
declare interface ScalingComponentProps {
/**
* The default scale
*/
defaultScale?: number;
/**
* The minimum scale to apply
*/
minScale?: number;
/**
* Margin percentage to leave around the scaled element (0-1)
*/
margin?: number;
/**
* Additional class name for the container
*/
className?: string;
/**
* Whether to show debug information
*/
debug?: boolean;
/**
* Children to render inside the scaling element
*/
children: React.ReactNode;
}
export { }