import * as Popover from '@radix-ui/react-popover'; import { FC, useState } from 'react'; import { Flex, Grid, NitroCardContentView } from '../../../../common'; interface ChatInputStyleSelectorViewProps { chatStyleId: number; chatStyleIds: number[]; selectChatStyleId: (styleId: number) => void; } export const ChatInputStyleSelectorView: FC = props => { const { chatStyleIds = null, selectChatStyleId = null } = props; const [ selectorVisible, setSelectorVisible ] = useState(false); const selectStyle = (styleId: number) => { selectChatStyleId(styleId); setSelectorVisible(false); }; return (
{chatStyleIds && chatStyleIds.length > 0 && chatStyleIds.map(styleId => ( selectStyle(styleId)}>
))} ); };