mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Avatar defaults and colors
This commit is contained in:
9
ts/test-both/helpers/getRandomColor.ts
Normal file
9
ts/test-both/helpers/getRandomColor.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { sample } from 'lodash';
|
||||
import { AvatarColors, AvatarColorType } from '../../types/Colors';
|
||||
|
||||
export function getRandomColor(): AvatarColorType {
|
||||
return sample(AvatarColors) || AvatarColors[0];
|
||||
}
|
||||
Reference in New Issue
Block a user