feat: GUI to create smart views (#1997)

This commit is contained in:
Aman Harwara
2022-11-14 19:40:00 +05:30
committed by GitHub
parent 1c23bc1747
commit f656185c16
28 changed files with 1032 additions and 78 deletions

View File

@@ -3,7 +3,7 @@ import Icon from '@/Components/Icon/Icon'
import { IconType } from '@standardnotes/snjs'
type Props = {
onClick: () => void
onClick: MouseEventHandler<HTMLButtonElement>
className?: string
icon: IconType
iconClassName?: string
@@ -21,9 +21,9 @@ const IconButton: FunctionComponent<Props> = ({
iconClassName = '',
disabled = false,
}) => {
const click: MouseEventHandler = (e) => {
const click: MouseEventHandler<HTMLButtonElement> = (e) => {
e.preventDefault()
onClick()
onClick(e)
}
const focusableClass = focusable ? '' : 'focus:shadow-none'
return (