Skip to content

Commit

Permalink
Fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
haideralsh committed Sep 5, 2024
1 parent b387359 commit 04157d0
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/BrandedNavBar/MobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const BaseMobileMenu: React.FC<React.PropsWithChildren<BaseMobileMenuProps>> = (
}) => (
<Nav backgroundColor={themeColorObject && themeColorObject.background} {...props}>
<BrandingWrap>
<BrandingText logoColor={themeColorObject.logoColor} />
<BrandingText logoColor={themeColorObject?.logoColor} />
</BrandingWrap>
<Menu>
{menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject)}
Expand Down
2 changes: 1 addition & 1 deletion src/BrandedNavBar/NavBarDropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class StatelessNavBarDropdownMenu extends StatelessNavBarDropdownMenuClass {
ref(node);
this.setTriggerRef(node);
},
},
}
)
}
</Reference>
Expand Down
4 changes: 2 additions & 2 deletions src/Button/ControlIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ const StyledButton: React.FC<React.PropsWithChildren<any>> = styled.button(
backgroundColor: theme.colors.lightGrey,
},
}),
space,
space
);

const ControlIcon = React.forwardRef(
({ icon, toggled, disabled, label, size = "x4", type = "button", ...props }: ControlIconProps, ref) => (
<StyledButton aria-label={label} ref={ref} disabled={disabled} toggled={toggled} type={type} {...props}>
<Icon size={size} icon={icon} />
</StyledButton>
),
)
);
export default ControlIcon;
4 changes: 2 additions & 2 deletions src/StatusIndicator/StatusIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const StatusIndicatorValues = {
quiet: "quiet",
} as const;

export type StatusIndicatorType = (typeof StatusIndicatorValues)[keyof typeof StatusIndicatorValues];
export type StatusIndicatorType = typeof StatusIndicatorValues[keyof typeof StatusIndicatorValues];

const statusIndicatorStyles = (theme: DefaultNDSThemeType) => ({
[StatusIndicatorValues.neutral]: {
Expand Down Expand Up @@ -68,7 +68,7 @@ const StatusIndicator = styled.span<Props>(
letterSpacing: ".05em",
borderRadius: theme.space.x1,
...statusIndicatorStyles(theme)[type],
}),
})
);

export default StatusIndicator;
2 changes: 1 addition & 1 deletion src/Table/TableCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const StyledTableCell: React.FC<React.PropsWithChildren<StyledTableCellProps>> =
paddingLeft: padding,
},
};
},
}
);

type TableCellProps = {
Expand Down
4 changes: 2 additions & 2 deletions src/Table/TableFoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const renderRows = (rows, columns, keyField, loading, compact) =>

const TableFooterRow = ({ row, columns, loading, compact }) => {
const columnsWithoutControls = columns.filter(
(column) => column.dataKey !== "selected" && column.dataKey !== "expanded",
(column) => column.dataKey !== "selected" && column.dataKey !== "expanded"
);
const numberOfControlColumns = columns.length - columnsWithoutControls.length;
return (
Expand All @@ -42,7 +42,7 @@ const TableFooterRow = ({ row, columns, loading, compact }) => {
compact={compact}
/>
)
),
)
)}
</StyledFooterRow>
);
Expand Down
5 changes: 2 additions & 3 deletions src/Table/addExpandableControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ const ExpandCell = ({ row, onRowExpansionChange }: ExpandCellProps) => {
);
};

const expandCellRenderer = (onRowExpansionChange) => (props) => (
<ExpandCell onRowExpansionChange={onRowExpansionChange} {...props} />
);
const expandCellRenderer = (onRowExpansionChange) => (props) =>
<ExpandCell onRowExpansionChange={onRowExpansionChange} {...props} />;
const addExpandableColumn = ({ columns, onRowExpansionChange }) => {
const expandableColumn = {
dataKey: EXPANDABLE_COLUMN_DATA_KEY,
Expand Down
2 changes: 1 addition & 1 deletion src/Tabs/Tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const TabButton = styled.button<TabButtonProps>(
px: "x3",
},
},
}),
})
);

type TabProps = TabButtonProps & {
Expand Down
4 changes: 2 additions & 2 deletions src/Textarea/Textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
size,
...props
},
ref,
ref
) => {
const componentSize = useComponentSize(size);
const spaceProps = getSubset(props, propTypes.space);
Expand Down Expand Up @@ -69,7 +69,7 @@ const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
<InlineValidation mt="x1" errorMessage={errorMessage} errorList={errorList} />
</Field>
);
},
}
);

export default Textarea;
4 changes: 2 additions & 2 deletions src/TimeRange/TimeRange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const TimeRange = forwardRef(
},
...props
}: TimeRangeProps,
ref,
ref
) => {
const [startTime, setStartTime] = useState();
const [endTime, setEndTime] = useState();
Expand Down Expand Up @@ -176,7 +176,7 @@ const TimeRange = forwardRef(
{...props}
/>
);
},
}
);

export default TimeRange;
2 changes: 1 addition & 1 deletion src/Toggle/ToggleButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const ToggleInput = styled.input(
transform: disabled ? null : `scale(${animationConfig.scale})`,
boxShadow: disabled ? undefined : theme.shadows.focus,
},
}),
})
);

const ToggleButton = React.forwardRef<React.Ref<HTMLInputElement>, ToggleButtonProps>((props, ref) => {
Expand Down
4 changes: 2 additions & 2 deletions src/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const Tooltip = React.forwardRef<any, TooltipProps>(
tooltip,
children,
},
ref,
ref
) => (
<Popper
ref={ref}
Expand All @@ -53,7 +53,7 @@ const Tooltip = React.forwardRef<any, TooltipProps>(
{tooltip}
</TooltipContainer>
</Popper>
),
)
);

export default Tooltip;
2 changes: 1 addition & 1 deletion src/Type/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Text = styled.p<TextProps>(
opacity: disabled ? "0.7" : undefined,
display: inline ? "inline" : undefined,
}),
addStyledProps,
addStyledProps
);

export default Text;

0 comments on commit 04157d0

Please sign in to comment.