better color support

This commit is contained in:
Felix Roos
2022-12-26 22:13:41 +01:00
parent b8f0a1dd82
commit 36f837730a
4 changed files with 214 additions and 2 deletions
+20
View File
@@ -0,0 +1,20 @@
import { colorMap } from '@strudel.cycles/core/color.mjs';
import React from 'react';
const Colors = () => {
return (
<div>
{Object.entries(colorMap).map(([name, hex]) => (
<div key={name} className="py-1">
<div className="grid gap-2 grid-cols-3">
<div>{name}</div>
<div style={{ backgroundColor: hex }}></div>
<div style={{ backgroundColor: name, color: hex }}>{name}</div>
</div>
</div>
))}
</div>
);
};
export default Colors;