2021-08-24 20:17:51 -04:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
2023-08-01 09:06:29 -07:00
|
|
|
import { IdenticonSVGForContact, IdenticonSVGForGroup } from './IdenticonSVG';
|
2021-08-24 20:17:51 -04:00
|
|
|
import { AvatarColorMap } from '../types/Colors';
|
|
|
|
|
2022-06-06 20:48:02 -04:00
|
|
|
export default {
|
|
|
|
title: 'Components/IdenticonSVG',
|
|
|
|
};
|
|
|
|
|
2023-08-01 09:06:29 -07:00
|
|
|
export function AllColorsForContact(): JSX.Element {
|
2022-06-06 20:48:02 -04:00
|
|
|
const stories: Array<JSX.Element> = [];
|
|
|
|
|
|
|
|
AvatarColorMap.forEach(value =>
|
|
|
|
stories.push(
|
2023-08-01 09:06:29 -07:00
|
|
|
<IdenticonSVGForContact
|
|
|
|
backgroundColor={value.bg}
|
|
|
|
text="HI"
|
|
|
|
foregroundColor={value.fg}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
return <>{stories}</>;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function AllColorsForGroup(): JSX.Element {
|
|
|
|
const stories: Array<JSX.Element> = [];
|
|
|
|
|
|
|
|
AvatarColorMap.forEach(value =>
|
|
|
|
stories.push(
|
|
|
|
<IdenticonSVGForGroup
|
2022-06-06 20:48:02 -04:00
|
|
|
backgroundColor={value.bg}
|
|
|
|
foregroundColor={value.fg}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
);
|
2021-08-24 20:17:51 -04:00
|
|
|
|
2022-06-06 20:48:02 -04:00
|
|
|
return <>{stories}</>;
|
2022-11-17 16:45:19 -08:00
|
|
|
}
|