import React, { useState } from 'react'; export const PermissionsView = ({ permissions, label, addPermission, removePermission, }: { permissions: string[]; label: string; addPermission: (a: string) => void; removePermission: (a: string) => void; }) => { const [value, setValue] = useState(''); return (

{label}

{ e.preventDefault(); addPermission(value); setValue(''); }} > setValue(e.target.value)} placeholder="..." />
); };