Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direction is no longer available as a prop. #220

Open
howardleejh opened this issue Jul 29, 2024 · 0 comments
Open

Direction is no longer available as a prop. #220

howardleejh opened this issue Jul 29, 2024 · 0 comments

Comments

@howardleejh
Copy link

Describe the bug
"Direction" is no longer exposed as a prop.

To Reproduce
Steps to reproduce the behavior:

  1. Import the Bounce component: import { Bounce } from 'react-awesome-reveal'
  2. Attempt to assign a direction of either "left | right | up | down"
  3. Type error that states "direction: string " is not assignable to type IntrinsicAttributes & RevealProps
  4. See error

Expected behavior
Props is exposed for me to assign direction of effect

Desktop (please complete the following information):

  • OS: [MacOS]
  • Browser [Chrome]
  • Version [N.A]

Additional context
Using React-Awesome-Reveal v4.2.13

export interface RevealProps {
    /**
     * Stagger its children animations.
     * @default false
     */
    cascade?: boolean;
    /**
     * Factor that affects the delay that each animated element in a cascade animation will be assigned.
     * @default 0.5
     */
    damping?: number;
    /**
     * Initial delay, in milliseconds.
     * @default 0
     */
    delay?: number;
    /**
     * Animation duration, in milliseconds.
     * @default 1000
     */
    duration?: number;
    /**
     * Float number between 0 and 1 indicating how much the element should be in viewport before the animation is triggered.
     * @default 0
     */
    fraction?: number;
    /**
     * Custom Emotion animation keyframes.
     */
    keyframes?: Keyframes;
    /**
     * Specifies if the animation should run only once or everytime the element enters/exits/re-enters the viewport.
     * @default false
     */
    triggerOnce?: boolean;
    /**
     * Class names to add to the container element.
     */
    className?: string;
    /**
     * Inline styles to add to the container element.
     */
    style?: React.CSSProperties;
    /**
     * Class names to add to the child element.
     */
    childClassName?: string;
    /**
     * Inline styles to add to the child element.
     */
    childStyle?: React.CSSProperties;
    /**
     * From React 18, children must be explicitly typed.
     * @see https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html#updates-to-typescript-definitions
     */
    children?: React.ReactNode;
    /**
     * Callback executed when the element enters or leaves the viewport.
     * If more than one element is being animated, this function is called
     * on each element.
     *
     * @param inView The current visibility flag.
     * @param entry The current IntersectionObserverEntry.
     */
    onVisibilityChange?(inView: boolean, entry: IntersectionObserverEntry): void;
}
export declare const Reveal: React.FC<RevealProps>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant