Skip to content

Commit

Permalink
Tweak anonymous function color
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Jun 16, 2022
1 parent d226b56 commit 3b78947
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/interactions/src/components/MethodCall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,11 @@ export const ClassNode = ({ name }: { name: string }) => {

export const FunctionNode = ({ name }: { name: string }) => {
const colors = useThemeColors();
return <span style={{ color: colors.function }}>{name || <i>anonymous</i>}</span>;
return name ? (
<span style={{ color: colors.function }}>{name}</span>
) : (
<span style={{ color: colors.nullish, fontStyle: 'italic' }}>anonymous</span>
);
};

export const ElementNode = ({
Expand Down

0 comments on commit 3b78947

Please sign in to comment.