Skip to content

Commit b979b48

Browse files
style: clean up learn fro mmistakes component
1 parent 89ac7d5 commit b979b48

1 file changed

Lines changed: 22 additions & 23 deletions

File tree

src/components/Analysis/LearnFromMistakes.tsx

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export const LearnFromMistakes: React.FC<Props> = ({
3535
// Show player selection dialog
3636
if (state.showPlayerSelection) {
3737
return (
38-
<div className="flex h-full w-full flex-col border-white/10 bg-gradient-to-br text-white">
39-
<div className="flex items-center justify-between border-b border-white/10 px-4 py-2">
38+
<div className="flex h-full w-full flex-col border-white/10 text-white">
39+
<div className="flex items-center justify-between border-b border-glassBorder px-4 py-2">
4040
<div className="flex items-center gap-2">
4141
<span className="material-symbols-outlined !text-sm text-white/80">
4242
school
@@ -136,8 +136,8 @@ export const LearnFromMistakes: React.FC<Props> = ({
136136
}
137137

138138
return (
139-
<div className="to-white/4 flex h-full w-full flex-col justify-between gap-4 rounded-2xl border border-white/10 bg-gradient-to-br from-white/10 text-white backdrop-blur-lg">
140-
<div className="flex items-center justify-between border-b border-white/10 pb-3">
139+
<div className="flex h-full w-full flex-col justify-between text-white">
140+
<div className="flex items-center justify-between border-b border-glassBorder px-4 py-2">
141141
<div className="flex items-center gap-2">
142142
<span className="material-symbols-outlined !text-sm text-white/80">
143143
school
@@ -149,60 +149,59 @@ export const LearnFromMistakes: React.FC<Props> = ({
149149
</div>
150150
<button
151151
onClick={onStop}
152-
className="flex items-center gap-1 rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xxs text-white/70 transition duration-200 hover:border-white/20 hover:bg-white/10 hover:text-white"
152+
title="Stop learning"
153+
className="flex items-center gap-1 rounded border border-white/10 bg-white/5 px-2 py-1 text-xxs text-white/70 transition duration-200 hover:border-white/20 hover:bg-white/10 hover:text-white"
153154
>
154155
<span className="material-symbols-outlined !text-xxs">close</span>
155156
Stop
156157
</button>
157158
</div>
158-
159-
<div className="flex flex-1 flex-col gap-3">
159+
<div className="flex flex-1 flex-col items-start justify-start gap-6 p-3">
160160
<p className="text-sm text-white/75">{getPromptText()}</p>
161161
{getFeedbackText() && (
162162
<p
163163
className={`text-sm ${
164164
state.showSolution
165-
? 'text-green-300'
165+
? 'text-green-400'
166166
: lastMoveResult === 'incorrect'
167-
? 'text-orange-300/80'
167+
? 'text-orange-400'
168168
: 'text-white'
169169
}`}
170170
>
171171
{getFeedbackText()}
172172
</p>
173173
)}
174174
</div>
175-
176-
<div className="flex w-full gap-3 pt-1">
175+
<div className="flex w-full gap-3 p-3">
177176
{!state.showSolution && lastMoveResult !== 'correct' ? (
178177
<>
179-
<button
180-
onClick={onShowSolution}
181-
className="flex flex-1 items-center justify-center gap-1.5 rounded-lg border border-human-4/40 bg-human-4/80 px-3 py-2 text-sm font-medium text-white/90 transition duration-200 hover:bg-human-4"
182-
>
183-
<span className="material-symbols-outlined !text-sm">
184-
lightbulb
185-
</span>
186-
See solution
187-
</button>
188178
{!isLastMistake && (
189179
<button
190180
onClick={onNext}
191-
className="flex flex-1 items-center justify-center gap-1.5 rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-white/75 transition duration-200 hover:border-white/20 hover:bg-white/10 hover:text-white"
181+
className="flex flex-1 items-center justify-center gap-1.5 rounded border border-glassBorder bg-glass px-3 py-2 text-sm font-medium text-white/75 transition duration-200 hover:bg-glass-strong"
192182
>
193183
<span className="material-symbols-outlined !text-sm">
194184
skip_next
195185
</span>
196186
Skip
197187
</button>
198188
)}
189+
<button
190+
onClick={onShowSolution}
191+
className="flex flex-1 items-center justify-center gap-1.5 rounded border border-human-4/40 bg-human-4/80 px-3 py-2 text-sm font-medium text-white/90 transition duration-200 hover:bg-human-4"
192+
>
193+
<span className="material-symbols-outlined !text-sm">
194+
lightbulb
195+
</span>
196+
See solution
197+
</button>
199198
</>
200199
) : (
201200
<button
202201
onClick={onNext}
203-
className="flex flex-1 items-center justify-center gap-1.5 rounded-lg border border-human-4/40 bg-human-4/70 px-3 py-2 text-sm font-semibold text-white transition duration-200 hover:bg-human-4/90"
202+
className="flex flex-1 items-center justify-center gap-1.5 rounded border border-human-4/40 bg-human-4/70 px-3 py-2 text-sm text-white transition duration-200 hover:bg-human-4/90"
204203
>
205-
<span className="material-symbols-outlined !text-base">
204+
<span className="material-symbols-outlined !text-sm">
206205
{isLastMistake ? 'check' : 'arrow_forward'}
207206
</span>
208207
{isLastMistake ? 'Finish' : 'Next mistake'}

0 commit comments

Comments
 (0)