@@ -10,7 +10,7 @@ import { ClearLogsButton } from "./ClearLogsButton"
1010import { ClientTab } from "./ClientTab"
1111import Header from "./Header"
1212import { HeaderTitle } from "./HeaderTitle"
13- import { useThemeName , withTheme } from "../theme/theme"
13+ import { useThemeName , themed } from "../theme/theme"
1414import { useGlobal } from "../state/useGlobal"
1515import { getReactotronAppId } from "../state/connectToServer"
1616
@@ -24,31 +24,26 @@ export function AppHeader() {
2424
2525 return (
2626 < Header >
27- < View style = { $tabContainer ( theme ) } >
27+ < View style = { $tabContainer ( ) } >
2828 { clientIds . map ( ( id ) => (
2929 < ClientTab key = { id } clientId = { id } />
3030 ) ) }
3131 </ View >
3232 < HeaderTitle title = { `Reactotron ${ reactotronAppId } ` } />
33- < View style = { $statusRow ( theme ) } >
33+ < View style = { $statusRow ( ) } >
3434 < View >
35- < TextInput value = { "SEARCHING" } placeholder = "Search" style = { { width : 100 } } />
35+ < TextInput value = { "SEARCHING" } placeholder = "Search" style = { $searchInput } />
3636 < Text > Search</ Text >
3737 </ View >
38- < View style = { $statusItem ( theme ) } >
39- < View
40- style = { [
41- $dot ( theme ) ,
42- error ? $dotRed ( theme ) : isConnected ? $dotGreen ( theme ) : $dotGray ( theme ) ,
43- ] }
44- />
45- < Text style = { $statusText ( theme ) } > Server</ Text >
38+ < View style = { $statusItem ( ) } >
39+ < View style = { [ $dot ( ) , error ? $dotRed ( ) : isConnected ? $dotGreen ( ) : $dotGray ( ) ] } />
40+ < Text style = { $statusText ( ) } > Server</ Text >
4641 < ClearLogsButton />
4742 </ View >
48- < View style = { $divider ( theme ) } />
49- < View style = { $statusItem ( theme ) } >
50- < View style = { [ $dot ( theme ) , arch === "Fabric" ? $dotGreen ( theme ) : $dotOrange ( theme ) ] } />
51- < Text style = { $statusText ( theme ) } > { arch } </ Text >
43+ < View style = { $divider ( ) } />
44+ < View style = { $statusItem ( ) } >
45+ < View style = { [ $dot ( ) , arch === "Fabric" ? $dotGreen ( ) : $dotOrange ( ) ] } />
46+ < Text style = { $statusText ( ) } > { arch } </ Text >
5247 </ View >
5348 </ View >
5449 < ActionButton
@@ -61,49 +56,51 @@ export function AppHeader() {
6156 )
6257}
6358
64- const $tabContainer = withTheme < ViewStyle > ( ( { spacing } ) => ( {
59+ const $tabContainer = themed < ViewStyle > ( ( { spacing } ) => ( {
6560 flexDirection : "row" ,
6661 paddingHorizontal : spacing . xl ,
6762 paddingVertical : spacing . md ,
6863 gap : spacing . md ,
6964} ) )
7065
71- const $statusRow = withTheme < ViewStyle > ( ( { spacing } ) => ( {
66+ const $statusRow = themed < ViewStyle > ( ( { spacing } ) => ( {
7267 flexDirection : "row" ,
7368 alignItems : "center" ,
7469 padding : spacing . sm ,
7570 justifyContent : "center" ,
7671} ) )
7772
78- const $statusItem = withTheme < ViewStyle > ( ( ) => ( {
73+ const $statusItem = themed < ViewStyle > ( ( ) => ( {
7974 flexDirection : "row" ,
8075 alignItems : "center" ,
8176 minWidth : 80 ,
8277} ) )
8378
84- const $divider = withTheme < ViewStyle > ( ( { colors, spacing } ) => ( {
79+ const $divider = themed < ViewStyle > ( ( { colors, spacing } ) => ( {
8580 width : 1 ,
8681 height : 24 ,
8782 backgroundColor : colors . border ,
8883 marginHorizontal : spacing . md ,
8984 borderRadius : 1 ,
9085} ) )
9186
92- const $dot = withTheme < ViewStyle > ( ( { colors } ) => ( {
87+ const $dot = themed < ViewStyle > ( ( { colors } ) => ( {
9388 width : 12 ,
9489 height : 12 ,
9590 borderRadius : 6 ,
9691 marginRight : 8 ,
9792 borderWidth : 1 ,
9893 borderColor : colors . border ,
9994} ) )
100- const $dotGray = withTheme < ViewStyle > ( ( { colors } ) => ( { backgroundColor : colors . neutral } ) )
101- const $dotGreen = withTheme < ViewStyle > ( ( { colors } ) => ( { backgroundColor : colors . success } ) )
102- const $dotRed = withTheme < ViewStyle > ( ( { colors } ) => ( { backgroundColor : colors . danger } ) )
103- const $dotOrange = withTheme < ViewStyle > ( ( { colors } ) => ( { backgroundColor : colors . primary } ) )
95+ const $dotGray = themed < ViewStyle > ( ( { colors } ) => ( { backgroundColor : colors . neutral } ) )
96+ const $dotGreen = themed < ViewStyle > ( ( { colors } ) => ( { backgroundColor : colors . success } ) )
97+ const $dotRed = themed < ViewStyle > ( ( { colors } ) => ( { backgroundColor : colors . danger } ) )
98+ const $dotOrange = themed < ViewStyle > ( ( { colors } ) => ( { backgroundColor : colors . primary } ) )
10499
105- const $statusText = withTheme < TextStyle > ( ( { colors } ) => ( {
100+ const $statusText = themed < TextStyle > ( ( { colors } ) => ( {
106101 fontSize : 16 ,
107102 color : colors . mainText ,
108103 fontWeight : "600" ,
109104} ) )
105+
106+ const $searchInput : ViewStyle = { width : 100 }
0 commit comments