focalboard/webapp/src/blockIcons.ts

16 lines
416 B
TypeScript
Raw Normal View History

2020-10-20 21:50:53 +02:00
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
2020-10-20 21:52:56 +02:00
import {randomEmojiList} from './emojiList'
2020-10-08 18:21:27 +02:00
class BlockIcons {
2020-10-20 21:50:53 +02:00
static readonly shared = new BlockIcons()
2020-10-08 18:21:27 +02:00
2020-10-20 21:50:53 +02:00
randomIcon(): string {
const index = Math.floor(Math.random() * randomEmojiList.length)
const icon = randomEmojiList[index]
return icon
}
2020-10-08 18:21:27 +02:00
}
2020-10-20 21:50:53 +02:00
export {BlockIcons}