Files
standardnotes-app-web/app/assets/javascripts/Components/Preferences/PreferencesComponents/MenuItem.tsx
Mo fdf290ea1a feat: error decrypting preferences section (#990)
* feat: error decrypting preferences section

* chore: upgrade snjs
2022-04-21 10:33:59 -05:00

33 lines
706 B
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { Icon } from '@/Components/Icon'
import { FunctionComponent } from 'preact'
import { IconType } from '@standardnotes/snjs'
interface Props {
iconType: IconType
label: string
selected: boolean
hasBubble?: boolean
onClick: () => void
}
export const MenuItem: FunctionComponent<Props> = ({
iconType,
label,
selected,
onClick,
hasBubble,
}) => (
<div
className={`preferences-menu-item select-none ${selected ? 'selected' : ''}`}
onClick={(e) => {
e.preventDefault()
onClick()
}}
>
<Icon className="icon" type={iconType} />
<div className="min-w-1" />
{label}
{hasBubble && <span className="ml-1 color-warning"></span>}
</div>
)