Skip to content

Commit 627d3b6

Browse files
committed
doc: update online editing theme.
1 parent d1b3ed7 commit 627d3b6

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

core/README.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,22 @@ export default function Demo() {
283283
/>
284284
<div>
285285
<Colorful color={hex} onChange={onChange} />
286-
<div style={{ display: 'flex', gap: '0.4rem', flexDirection: 'column' }}>
286+
<div style={{ display: 'flex', gap: '0.4rem', flexDirection: 'column', ...customTheme }}>
287287
{Object.keys(customTheme).map((varname, idx) => {
288288
const click = () => {
289289
setCssvar(varname);
290290
setHex(customTheme[varname]);
291291
};
292292
const active = cssvar === varname ? '#a8a8a8' : '';
293-
return <button key={idx} style={{ background: active, border: 0,boxShadow: 'inset 0px 0px 1px #000', textAlign: 'left' }} onClick={click}>{varname}</button>
293+
return (
294+
<button key={idx}
295+
style={{ background: active, border: 0,boxShadow: 'inset 0px 0px 1px #000', display: 'flex', alignItems: 'center', gap: 5, padding: '1px 3px' }}
296+
onClick={click}
297+
>
298+
<span style={{ display: 'inline-block', width: 12, height: 12, background: `var(${varname})` }}></span>
299+
{varname}
300+
</button>
301+
)
294302
})}
295303
</div>
296304
</div>

0 commit comments

Comments
 (0)