This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react" | |
import { Stack, addPropertyControls, ControlType } from "framer" | |
import { ContactItem } from "./canvas" | |
type Props = { | |
count: number | |
} | |
export function ContactList({ count = 5 }: Props) { | |
const [users, setUsers] = React.useState([]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, FC } from 'react' | |
import { connect } from 'react-redux' | |
import UserList from '../../components/UserList' | |
import { RootState, RootDispatch } from '../../store' | |
type UsersProps = ReturnType<typeof mapState> & ReturnType<typeof mapDispatch> | |
const Users: FC<UsersProps> = ({ users, load }) => { | |
useEffect(() => { | |
load() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, FC } from 'react' | |
import { useSelector, useDispatch } from 'react-redux' | |
import UserList from '../../components/UserList' | |
import { RootState, RootDispatch } from '../../store' | |
const Users: FC = () => { | |
const users = useSelector((state: RootState) => state.users) | |
const dispatch = useDispatch<RootDispatch>() | |
useEffect(() => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, FC } from 'react' | |
import { useSelector, useDispatch } from 'react-redux' | |
import UserList from '../../components/UserList' | |
import { RootState, RootDispatch } from '../../store' | |
const useRematchDispatch = <D extends {}, MD>(selector: (dispatch: D) => MD) => { | |
const dispatch = useDispatch<D>() | |
return selector(dispatch) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { motion } from "framer-motion"; | |
const One = () => ( | |
<motion.div | |
className="rectangle" | |
animate={{ | |
opacity: 0.5, | |
background: "#ff00b1" | |
}} | |
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Two = () => ( | |
<motion.div | |
className="rectangle" | |
initial={{ | |
opacity: 0, | |
y: 50 | |
}} | |
animate={{ | |
opacity: 1, | |
y: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Three = () => { | |
const [active, setActive] = React.useState(false); | |
return ( | |
<motion.div | |
className="rectangle" | |
animate={ | |
active | |
? { background: "#ff00b1", rotate: 90 } | |
: { background: "#0D00FF", rotate: 0 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Four = () => { | |
const [active, setActive] = React.useState(false); | |
const rectangle: Variants = { | |
active: { background: "#ff00b1", rotate: 90 }, | |
disabled: { background: "#0D00FF", rotate: 0 } | |
}; | |
return ( | |
<motion.div |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Five = () => { | |
const container: Variants = { | |
active: { | |
background: "#ff00b1" | |
}, | |
disabled: { | |
background: "#0D00FF" | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Six = () => { | |
const container: Variants = { | |
active: { | |
background: "#ff00b1", | |
}, | |
disabled: { | |
background: "#0D00FF" | |
} | |
}; |