// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import React from 'react' import {useIntl, IntlShape} from 'react-intl' import Menu from '../widgets/menu' import propsRegistry from '../properties' import {PropertyType} from '../properties/types' import './propertyMenu.scss' type Props = { propertyId: string propertyName: string propertyType: PropertyType onTypeAndNameChanged: (newType: PropertyType, newName: string) => void onDelete: (id: string) => void } function typeMenuTitle(intl: IntlShape, type: PropertyType): string { return `${intl.formatMessage({id: 'PropertyMenu.typeTitle', defaultMessage: 'Type'})}: ${type.displayName(intl)}` } type TypesProps = { label: string onTypeSelected: (type: PropertyType) => void } export const PropertyTypes = (props: TypesProps): JSX.Element => { const intl = useIntl() return ( <>