Skip to content

Commit

Permalink
feat: change prop names
Browse files Browse the repository at this point in the history
  • Loading branch information
purrseus committed Dec 10, 2024
1 parent 90afe1f commit ab7cebb
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/ui/Xenon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import { Bubble, ConsolePanel, DebuggerHeader, DetailsViewer, NetworkPanel } fro
import MainContext, { type MainContextValue } from '../contexts/MainContext';

interface XenonComponentMethods {
show: () => void;
hide: () => void;
show(): void;
hide(): void;
}

interface XenonComponentProps {
autoRecordNetwork?: boolean;
autoRecordLogs?: boolean;
autoInspectNetwork?: boolean;
autoInspectConsole?: boolean;
bubbleSize?: number;
}

Expand All @@ -23,8 +23,8 @@ interface ReactNativeXenon extends XenonComponentMethods {
const rootRef = createRef<XenonComponentMethods>();

function XenonComponent({
autoRecordNetwork = true,
autoRecordLogs = true,
autoInspectNetwork = true,
autoInspectConsole = true,
bubbleSize = 40,
}: XenonComponentProps) {
const { width: screenWidth, height: screenHeight } = useWindowDimensions();
Expand All @@ -41,20 +41,20 @@ function XenonComponent({
const [panelSelected, setPanelSelected] = useState<DebuggerPanel | null>(DebuggerPanel.Network);

const networkInterceptor = useNetworkInterceptor({
autoEnabled: autoRecordNetwork,
autoEnabled: autoInspectNetwork,
});

const logInterceptor = useConsoleInterceptor({
autoEnabled: autoRecordLogs,
autoEnabled: autoInspectConsole,
});

useImperativeHandle(
rootRef,
() => ({
show: () => {
show() {
setDebuggerVisibility('bubble');
},
hide: () => {
hide() {
setDebuggerVisibility('hidden');
},
}),
Expand Down

0 comments on commit ab7cebb

Please sign in to comment.