Skip to content

Commit

Permalink
[IOAPPFD0-203] Fix the margin of the icon of the ListItemHeader com…
Browse files Browse the repository at this point in the history
…ponent that is too wide (#171)
  • Loading branch information
dmnplb authored Dec 18, 2023
1 parent be0f950 commit da78c01
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/listitems/ListItemHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { View } from "react-native";
import {
IOListItemStyles,
IOListItemVisualParams,
IOSpacingScale,
IOStyles,
useIOTheme
} from "../../core";
import { WithTestID } from "../../utils/types";
import { Badge } from "../badge";
import { ButtonLink, IconButton } from "../buttons";
import { IOIcons, Icon } from "../icons";
import { H6 } from "../typography";
import { ButtonLink, IconButton } from "../buttons";
import { Badge } from "../badge";

type ButtonLinkActionProps = {
type: "buttonLink";
Expand Down Expand Up @@ -48,6 +49,8 @@ export type ListItemHeader = WithTestID<{
}> &
IconProps;

const iconMargin: IOSpacingScale = 8;

export const ListItemHeader = ({
label,
iconName,
Expand Down Expand Up @@ -124,7 +127,7 @@ export const ListItemHeader = ({
>
<View style={IOListItemStyles.listItemInner}>
{iconName && (
<View style={{ marginRight: IOListItemVisualParams.actionMargin }}>
<View style={{ marginRight: iconMargin }}>
<Icon
name={iconName}
color={iconColor ?? theme["icon-decorative"]}
Expand Down

0 comments on commit da78c01

Please sign in to comment.