File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 StyledTopBarButtons ,
1313 StyledTopBarPath ,
1414} from "./styles" ;
15+ import useSystemSettings from "../../stores/systemSettingsStore" ;
1516
1617const defaultPath = "/home/user" ;
1718
@@ -33,6 +34,10 @@ function TopBar({
3334 navForward,
3435 navBack,
3536} : TopBarProps ) {
37+ const [ backgroundColor , fontColor ] = useSystemSettings ( ( s ) => [
38+ s . accentColor ,
39+ s . fontColor ,
40+ ] ) ;
3641 return (
3742 < StyledTopBar >
3843 < StyledTopBarButtons >
@@ -43,6 +48,8 @@ function TopBar({
4348 value = { pathSearch }
4449 onChange = { onPathInputChange }
4550 onKeyDown = { onPathInputSubmit }
51+ backgroundColor = { backgroundColor }
52+ color = { fontColor }
4653 />
4754 </ StyledTopBar >
4855 ) ;
@@ -53,7 +60,7 @@ function FileBrowser({ path = defaultPath }: FileBrowserProps) {
5360 const appRef = useRef < HTMLDivElement > ( null ) ;
5461
5562 const [ pathSearch , setPathSearch ] = useState < string > (
56- fs . currentDirectory . path
63+ fs . currentDirectory . path ,
5764 ) ;
5865
5966 useEffect ( ( ) => {
Original file line number Diff line number Diff line change @@ -48,13 +48,19 @@ export const StyledTopBarButton = styled.div`
4848 }
4949` ;
5050
51- export const StyledTopBarPath = styled . input `
51+ interface StyledTopBarPathProps {
52+ backgroundColor : string ;
53+ color : string ;
54+ }
55+ export const StyledTopBarPath = styled . input < StyledTopBarPathProps > `
5256 height: 30px;
5357 width: 100%;
5458 padding: 5px 10px;
5559 border-radius: 50px;
5660 border: none;
5761 box-sizing: border-box;
62+ background-color: ${ ( props ) => props . backgroundColor } ;
63+ color: ${ ( props ) => props . color } ;
5864
5965 &:focus-visible {
6066 outline: none;
You can’t perform that action at this time.
0 commit comments