main

mattermost/focalboard

Last updated at: 29/12/2023 09:42

property.tsx

TLDR

This file exports a class called "UnknownProperty" that extends another class called "PropertyType". It also imports the "IntlShape" interface from the react-intl library and the "Text" component from another file. This class is used to define a property type for an unknown property.

Classes

UnknownProperty

This class extends the "PropertyType" class and represents a property type for an unknown property. It defines the following properties:

  • Editor: The component to be used as an editor for this property type.
  • name: The name of this property type.
  • type: The type of this property type, set to 'unknown'.
  • displayName: A function that returns the translated display name of this property type, using the "intl" object.
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {IntlShape} from 'react-intl'

import Text from '../text/text'
import {PropertyType, PropertyTypeEnum} from '../types'

export default class UnkownProperty extends PropertyType {
    Editor = Text
    name = 'Text'
    type = 'unknown' as PropertyTypeEnum
    displayName = (intl: IntlShape) => intl.formatMessage({id: 'PropertyType.Unknown', defaultMessage: 'Unknown'})
}