fix: 全局 LED 配置样式问题。

This commit is contained in:
2023-01-29 00:39:51 +08:00
parent a7137f0d51
commit 45f3f79a49
6 changed files with 111 additions and 42 deletions

View File

@ -4,6 +4,7 @@ import { invoke } from '@tauri-apps/api/tauri';
import './App.css';
import { Configurator } from './configurator/configurator';
import { ButtonSwitch } from './commons/components/button';
import { fillParentCss } from './styles/fill-parent';
type Mode = 'Flowing' | 'Follow' | null;
@ -40,7 +41,7 @@ function App() {
);
return (
<div>
<div css={[fillParentCss]} tw="box-border flex flex-col">
<div tw="flex justify-between">
{ledStripColors.map((it) => (
<span tw="h-8 flex-auto" style={{ backgroundColor: it }}></span>
@ -55,7 +56,7 @@ function App() {
))}
</div>
<div tw="flex gap-5 justify-center ">
<div tw="flex gap-5 justify-center">
<ButtonSwitch onClick={() => takeSnapshot()}>Take Snapshot</ButtonSwitch>
<ButtonSwitch onClick={() => getLedStripColors()}>Get Colors</ButtonSwitch>
<ButtonSwitch onClick={() => switchCurrentMode('Flowing')}>
@ -64,7 +65,7 @@ function App() {
<ButtonSwitch onClick={() => switchCurrentMode('Follow')}>Follow</ButtonSwitch>
</div>
<div tw="flex gap-5 justify-center">
<div css={[fillParentCss]}>
<Configurator />
</div>
</div>