Skip to content

Commit 9291221

Browse files
committed
tui: simplify prompt mode toggle icon colors via CSS and tighten message timeline padding
1 parent bab3124 commit 9291221

3 files changed

Lines changed: 23 additions & 17 deletions

File tree

packages/app/src/components/prompt-input.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,14 +1361,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
13611361
class="w-full h-full flex items-center justify-center rounded-[2px] transition-colors hover:bg-surface-inset-base"
13621362
classList={{ "hover:bg-transparent": store.mode === "shell" }}
13631363
>
1364-
<Icon
1365-
name="console"
1366-
class="size-[18px]"
1367-
classList={{
1368-
"text-icon-strong-base": store.mode === "shell",
1369-
"text-icon-weak": store.mode !== "shell",
1370-
}}
1371-
/>
1364+
<Icon name="console" class="size-[18px]" />
13721365
</div>
13731366
</button>
13741367
<button
@@ -1381,14 +1374,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
13811374
class="w-full h-full flex items-center justify-center rounded-[2px] transition-colors hover:bg-surface-inset-base"
13821375
classList={{ "hover:bg-transparent": store.mode === "normal" }}
13831376
>
1384-
<Icon
1385-
name="prompt"
1386-
class="size-[18px]"
1387-
classList={{
1388-
"text-icon-interactive-base": store.mode === "normal",
1389-
"text-icon-weak": store.mode !== "normal",
1390-
}}
1391-
/>
1377+
<Icon name="prompt" class="size-[18px]" />
13921378
</div>
13931379
</button>
13941380
</div>

packages/app/src/index.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
11
@import "@opencode-ai/ui/styles/tailwind";
2+
3+
[data-component="prompt-mode-toggle"] [data-slot="icon-svg"] {
4+
color: var(--icon-base);
5+
}
6+
7+
[data-component="prompt-mode-toggle"] [data-slot="icon-svg"] * {
8+
color: inherit;
9+
}
10+
11+
[data-component="prompt-mode-toggle"] button[aria-pressed="true"] [data-slot="icon-svg"] {
12+
color: var(--icon-strong-base);
13+
}
14+
15+
[data-component="prompt-mode-toggle"] [data-slot="icon-svg"] [stroke]:not([stroke="none"]) {
16+
stroke: currentColor;
17+
}
18+
19+
[data-component="prompt-mode-toggle"] [data-slot="icon-svg"] [fill]:not([fill="none"]) {
20+
fill: currentColor;
21+
}

packages/app/src/pages/session/message-timeline.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export function MessageTimeline(props: {
165165
"sticky top-0 z-30 bg-[linear-gradient(to_bottom,var(--background-stronger)_48px,transparent)]": true,
166166
"w-full": true,
167167
"pb-4": true,
168-
"pl-2 pr-4 md:pl-4 md:pr-6": true,
168+
"pl-2 pr-3 md:pl-4 md:pr-3": true,
169169
"md:max-w-200 md:mx-auto 2xl:max-w-[1000px]": props.centered,
170170
}}
171171
>

0 commit comments

Comments
 (0)