import { FunctionComponent } from 'preact' import { Icon } from '../Icon/Icon' type Props = { onMouseLeave: () => void onMouseOver: () => void onClick: () => void showLockedIcon: boolean lockText: string } export const EditingDisabledBanner: FunctionComponent = ({ onMouseLeave, onMouseOver, onClick, showLockedIcon, lockText, }) => { const background = showLockedIcon ? 'bg-warning-faded' : 'bg-info-faded' const iconColor = showLockedIcon ? 'color-accessory-tint-3' : 'color-accessory-tint-1' const textColor = showLockedIcon ? 'color-warning' : 'color-accessory-tint-1' return (
{showLockedIcon ? ( ) : ( )} {lockText}
) }