import {EditIcon} from '@chakra-ui/icons' import { As, Button, Flex, Icon, Switch, Td, Text, Tr, useColorModeValue } from '@chakra-ui/react' import React from 'react' export interface NotifyTableRowProps { name: string description: string logo: As active: boolean onSwitchActive: (active: boolean) => void onEdit: () => void } export function NotifyTableRow(props: NotifyTableRowProps) { const {logo, name, description, active} = props const textColor = useColorModeValue('gray.700', 'white') const [isActive, setIsActive] = React.useState(active) React.useEffect(() => { setIsActive(active) }, [active]) const handleSwitchActive = () => { setIsActive(!isActive) props.onSwitchActive(!isActive) } return ( {name} {description} ) } export default NotifyTableRow