Skip to content

Commit 3ad01a0

Browse files
fix(theme): set correct background and text color for panels (#94)
1 parent 42134c9 commit 3ad01a0

File tree

8 files changed

+9
-10
lines changed

8 files changed

+9
-10
lines changed

docs/demo/theme.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ export const theme: ConfigBase['theme'] = {
179179
},
180180
panel: {
181181
backgroundColor: 'var(--tk-elements-panel-backgroundColor)',
182+
textColor: 'var(--tk-elements-panel-textColor)',
182183
header: {
183184
backgroundColor: 'var(--tk-elements-panel-header-backgroundColor)',
184185
textColor: 'var(--tk-elements-panel-header-textColor)',

packages/astro/src/default/styles/variables.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@
175175

176176
/* Panel */
177177
--tk-elements-panel-backgroundColor: var(--tk-elements-app-backgroundColor);
178+
--tk-elements-panel-textColor: var(--tk-elements-app-textColor);
178179

179180
/* Panel > Header */
180181
--tk-elements-panel-header-backgroundColor: var(--tk-background-secondary);

packages/astro/src/theme.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ export const theme: ConfigBase['theme'] = {
179179
},
180180
panel: {
181181
backgroundColor: 'var(--tk-elements-panel-backgroundColor)',
182+
textColor: 'var(--tk-elements-panel-textColor)',
182183
header: {
183184
backgroundColor: 'var(--tk-elements-panel-header-backgroundColor)',
184185
textColor: 'var(--tk-elements-panel-header-textColor)',

packages/components/react/src/BootScreen.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ export function BootScreen({ className, tutorialStore }: Props) {
1111
const steps = useStore(tutorialStore.steps);
1212

1313
return (
14-
<div
15-
className={classNames(
16-
'flex-grow w-full flex justify-center items-center text-sm bg-tk-elements-app-backgroundColor text-tk-elements-app-textColor',
17-
className,
18-
)}
19-
>
14+
<div className={classNames('flex-grow w-full flex justify-center items-center text-sm', className)}>
2015
{steps ? (
2116
<ul className="space-y-1">
2217
{steps.map((step, index) => (

packages/components/react/src/Panels/EditorPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function EditorPanel({
6262
}, [id]);
6363

6464
return (
65-
<PanelGroup className="bg-tk-elements-app-backgroundColor" direction="horizontal">
65+
<PanelGroup className="bg-tk-elements-panel-backgroundColor" direction="horizontal">
6666
<Panel className="flex flex-col" collapsible defaultSize={0} minSize={10} ref={fileTreePanelRef}>
6767
<div className="panel-header border-r border-b border-tk-elements-app-borderColor">
6868
<div className="panel-title">

packages/components/react/src/Panels/PreviewPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const PreviewPanel = memo(
7373

7474
if (!hasPreviews) {
7575
return (
76-
<div className="flex flex-col h-full w-full">
76+
<div className="panel-container bg-tk-elements-panel-backgroundColor text-tk-elements-panel-textColor">
7777
<div className="panel-header border-b border-tk-elements-app-borderColor justify-between">
7878
<div className="panel-title">
7979
<div className="panel-icon i-ph-lightning-duotone"></div>

packages/components/react/src/Panels/TerminalPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function TerminalPanel({ theme, tutorialStore }: TerminalPanelProps) {
4444
}, []);
4545

4646
return (
47-
<div className="panel-container bg-tk-elements-app-backgroundColor">
47+
<div className="panel-container bg-tk-elements-panel-backgroundColor text-tk-elements-panel-textColor">
4848
<div className="panel-tabs-header overflow-x-hidden">
4949
<div className="panel-title w-full">
5050
<ul

packages/components/react/src/Panels/WorkspacePanel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ export function WorkspacePanel({ tutorialStore, theme }: Props) {
146146
maxSize={hasEditor ? 100 : 0}
147147
collapsible={!hasEditor}
148148
ref={editorPanelRef}
149+
className="bg-tk-elements-panel-backgroundColor text-tk-elements-panel-textColor"
149150
>
150151
<EditorPanel
151152
id={tutorialStore.ref}
@@ -209,7 +210,7 @@ export function WorkspacePanel({ tutorialStore, theme }: Props) {
209210
onExpand={() => {
210211
terminalExpanded.current = true;
211212
}}
212-
className={classNames({
213+
className={classNames('bg-tk-elements-panel-backgroundColor text-tk-elements-panel-textColor', {
213214
'border-t border-tk-elements-app-borderColor': hasPreviews,
214215
})}
215216
>

0 commit comments

Comments
 (0)