ChemPare Documentation - v0.0.0
    Preparing search index...

    Variable IconSpinnerConst

    IconSpinner: React.FC<IconSpinnerProps> = ...

    A component that adds a spinning animation to any icon component passed as a child. The component preserves any existing styles while adding the spinning animation.

    The props from Material-UI's SvgIcon component

    An animated version of the provided icon

    // Simple icon with default size and speed
    <IconSpinner>
    <MyIcon />
    </IconSpinner>

    // Icon with custom size, default speed
    <IconSpinner>
    <MyIcon style={{ width: 100, height: 100 }} />
    </IconSpinner>

    // Icon with custom speed (as string)
    <IconSpinner speed={"fast"}>
    <MyIcon style={{ width: 100, height: 100 }} />
    </IconSpinner>

    // Icon with custom speed (as number)
    <IconSpinner speed={2}>
    <MyIcon style={{ width: 100, height: 100 }} />
    </IconSpinner>

    // Icon with custom speed from SpinSpeeds enum
    <IconSpinner speed={SpinSpeeds.MEDIUM}>
    <MyIcon style={{ width: 100, height: 100 }} />
    </IconSpinner>