import * as React from 'react'; import Bubble from '../../bubble/Bubble'; import Text from '../../text/Text'; import Button from '../../buttons/Button'; import Icon from '../../icons/Icon'; import Transition from '../Transition'; import Stage from './common/Stage'; const fadeEffect = { initial: { opacity: 0, }, animate: { opacity: 1, duration: 'moderate1', easing: 'entry', }, exit: { opacity: 0, duration: 'quick2', easing: 'exit', }, } as const; const containerSlideEffect = { initial: { opacity: 0, transform: { translateY: '-m', scaleY: 0.5, }, }, animate: { opacity: { value: 1, duration: 'quick2', }, transform: { translateY: 0, duration: 'gentle1', origin: 'left top', }, easing: 'entry', }, exit: { opacity: 0, transform: { translateY: '-m', }, duration: 'quick2', easing: 'exit', }, } as const; /** * A content transformation opposite to the container * transformation will keep the height of the content * while animating the container. */ const contentCounterSlideEffect = { initial: { // counter scale... transform: { scaleY: 1.5, }, }, animate: { // with the same duration and easing as container transform: { scaleY: 1, duration: 'gentle1', origin: 'left top', }, easing: 'entry', }, exit: { opacity: 0, duration: 'quick2', easing: 'exit', }, } as const; export const OffsetBehavior = () => { const [open, setOpen] = React.useState(false); return ( Louis Napoleon Bonaparte was the nephew of Napoleon Bonaparte. Napoleon III, the nephew of Napoleon I, was the first elected President of France from 1848 to 1852. Louis Napoleon seized power in 1851 and served as Emperor of the French from 1852 to 1870. He founded the Second French Empire and was its only emperor until the French army was defeated in the Franco-Prussian War in 1870. He aimed to modernize the French economy, rebuilt the center of Paris, expanded the overseas empire.