better color support
This commit is contained in:
parent
b8f0a1dd82
commit
36f837730a
4 changed files with 214 additions and 2 deletions
20
website/src/docs/Colors.jsx
Normal file
20
website/src/docs/Colors.jsx
Normal 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;
|
||||
12
website/src/pages/learn/colors.mdx
Normal file
12
website/src/pages/learn/colors.mdx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: Colors
|
||||
layout: ../../layouts/MainLayout.astro
|
||||
---
|
||||
|
||||
import { MiniRepl } from '../../docs/MiniRepl';
|
||||
import { JsDoc } from '../../docs/JsDoc';
|
||||
import Colors from '../../docs/Colors.jsx';
|
||||
|
||||
# Colors
|
||||
|
||||
<Colors />
|
||||
Loading…
Add table
Add a link
Reference in a new issue