side-tray-styles-patch #514
@@ -1,4 +1,4 @@
|
||||
import { useState } from 'react'
|
||||
import { getActiveClasses } from 'get-active-classes'
|
||||
import Svg from 'src/components/Svg/Svg'
|
||||
import {
|
||||
sidebarTopConfig,
|
||||
@@ -10,9 +10,11 @@ import { useIdeContext } from 'src/helpers/hooks/useIdeContext'
|
||||
function TabToggle({ item, className = '', active, onChange, onClick }) {
|
||||
return (
|
||||
<label
|
||||
className={`tabToggle${item.disabled ? ' disabled' : ''}${
|
||||
active ? ' active' : ''
|
||||
} ${className}`}
|
||||
className={getActiveClasses({
|
||||
'bg-ch-pink-800 text-ch-pink-300 bg-opacity-30': active,
|
||||
'text-ch-gray-550 cursor-not-allowed': item.disabled,
|
||||
[`text-ch-gray-300 p-3 mb-1 flex justify-center ${className}`]: true,
|
||||
})}
|
||||
>
|
||||
<input
|
||||
name="sidebar-tabs"
|
||||
|
||||
@@ -32,19 +32,6 @@
|
||||
|
||||
}
|
||||
|
||||
@layer components {
|
||||
.tabToggle {
|
||||
@apply text-ch-gray-300 p-3 mb-1 flex justify-center;
|
||||
}
|
||||
.tabToggle.active {
|
||||
@apply bg-ch-pink-800 text-ch-pink-300 bg-opacity-30;
|
||||
}
|
||||
.tabToggle.disabled {
|
||||
@apply text-ch-gray-550 cursor-not-allowed;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.three-debug-panel-1 {
|
||||
|
|
||||
position: fixed;
|
||||
padding-top: 300px;
|
||||
|
||||
Reference in New Issue
Block a user
Don't know why these didn't work.
Not sure I 100% love the pattern anyway since these styles are are very specific to one component and now completely seperate. I to optimize for delete-ability, and this would make it tricky to clean up
app/web/src/components/IdeSideBar/IdeSideBar.tsxshould we delete it down the track.Do you think it would be better to add these classes into a new css file in
app/web/src/components/IdeSideBar/IdeSideBar.cssand import that directly intoapp/web/src/components/IdeSideBar/IdeSideBar.tsxinstead @franknoirot?Yeah that's a good point, I think you're right having it local to the components directory is best.