@prokodo/ui
Version:
UI components for production-grade Next.js + Headless CMS (Strapi, Contentful, Headless WordPress) websites by prokodo – built for Core Web Vitals & SEO.
36 lines (35 loc) • 858 B
JavaScript
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
import { jsx } from "react/jsx-runtime";
import { create } from "../../helpers/bem.js";
import styles from "./Animated.module.scss.js";
const bem = create(styles, "Animated");
const AnimatedView = /* @__PURE__ */ __name(({
className,
disabled = false,
speed = "normal",
animation = "fade-in",
isVisible,
children,
...domRest
}) => /* @__PURE__ */ jsx(
"div",
{
className: bem(
void 0,
{
"is-visible": isVisible,
"is-disabled": disabled,
[`has-${speed}-speed`]: !!speed,
[`animate-${animation}`]: !!animation
},
className
),
...domRest,
children
}
), "AnimatedView");
AnimatedView.displayName = "AnimatedView";
export {
AnimatedView
};