feat: 새 설문조사 모듈 UI

This commit is contained in:
2022-05-16 01:41:10 +09:00
parent 29228ed3bc
commit 42cca07419
13 changed files with 650 additions and 19 deletions
+11
View File
@@ -0,0 +1,11 @@
import _colorNames from 'css-color-names';
const colorNames = _colorNames as Record<string, string>;
const colors: string[] = [
"red", "orange", "yellow", "green", "blue", "navy", "purple"
].map(color => colorNames[color]);
export function formatVoteColor(type: number): string {
return colors[type % colors.length];
}