Skip to content

Instantly share code, notes, and snippets.

View koss-lebedev's full-sized avatar

Konstantin koss-lebedev

View GitHub Profile
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([])
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()
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(() => {
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)
}
import { motion } from "framer-motion";
const One = () => (
<motion.div
className="rectangle"
animate={{
opacity: 0.5,
background: "#ff00b1"
}}
/>
const Two = () => (
<motion.div
className="rectangle"
initial={{
opacity: 0,
y: 50
}}
animate={{
opacity: 1,
y: 0
const Three = () => {
const [active, setActive] = React.useState(false);
return (
<motion.div
className="rectangle"
animate={
active
? { background: "#ff00b1", rotate: 90 }
: { background: "#0D00FF", rotate: 0 }
const Four = () => {
const [active, setActive] = React.useState(false);
const rectangle: Variants = {
active: { background: "#ff00b1", rotate: 90 },
disabled: { background: "#0D00FF", rotate: 0 }
};
return (
<motion.div
const Five = () => {
const container: Variants = {
active: {
background: "#ff00b1"
},
disabled: {
background: "#0D00FF"
}
};
const Six = () => {
const container: Variants = {
active: {
background: "#ff00b1",
},
disabled: {
background: "#0D00FF"
}
};