Skip to content

Commit

Permalink
Rename otherProps to restProps for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentSmedinga committed Jul 15, 2024
1 parent 18e632d commit c869a95
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/Accordion/AccordionSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type AccordionSectionProps = {

export const AccordionSection = forwardRef(
(
{ label, expanded = false, children, className, ...otherProps }: AccordionSectionProps,
{ label, expanded = false, children, className, ...restProps }: AccordionSectionProps,
ref: ForwardedRef<HTMLDivElement>,
) => {
const { headingLevel, sectionAs } = useContext(AccordionContext)
Expand All @@ -33,7 +33,7 @@ export const AccordionSection = forwardRef(
const panelId = `panel-${id}`

return (
<div className={clsx('ams-accordion__section', className)} ref={ref} {...otherProps}>
<div className={clsx('ams-accordion__section', className)} ref={ref} {...restProps}>
<HeadingX className={'ams-accordion__header'}>
<button
aria-controls={panelId}
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/Card/CardLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import type { AnchorHTMLAttributes, ForwardedRef, PropsWithChildren } from 'reac
export type CardLinkProps = PropsWithChildren<AnchorHTMLAttributes<HTMLAnchorElement>>

export const CardLink = forwardRef(
({ children, className, ...otherProps }: CardLinkProps, ref: ForwardedRef<HTMLAnchorElement>) => (
<a {...otherProps} ref={ref} className={clsx('ams-card__link', className)}>
({ children, className, ...restProps }: CardLinkProps, ref: ForwardedRef<HTMLAnchorElement>) => (
<a {...restProps} ref={ref} className={clsx('ams-card__link', className)}>
{children}
</a>
),
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type IconProps = {
} & HTMLAttributes<HTMLSpanElement>

export const Icon = forwardRef(
({ className, size = 'level-3', square, svg, ...otherProps }: IconProps, ref: ForwardedRef<HTMLElement>) => (
({ className, size = 'level-3', square, svg, ...restProps }: IconProps, ref: ForwardedRef<HTMLElement>) => (
<span
ref={ref}
className={clsx(
Expand All @@ -31,7 +31,7 @@ export const Icon = forwardRef(
square && 'ams-icon--square',
className,
)}
{...otherProps}
{...restProps}
>
{svg()}
</span>
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export type LinkProps = {

export const Link = forwardRef(
(
{ children, variant = 'standalone', onBackground, className, ...otherProps }: LinkProps,
{ children, variant = 'standalone', onBackground, className, ...restProps }: LinkProps,
ref: ForwardedRef<HTMLAnchorElement>,
) => (
<a
{...otherProps}
{...restProps}
ref={ref}
className={clsx(
'ams-link',
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/Paragraph/Paragraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type ParagraphProps = {

export const Paragraph = forwardRef(
(
{ children, className, inverseColor, size, ...otherProps }: ParagraphProps,
{ children, className, inverseColor, size, ...restProps }: ParagraphProps,
ref: ForwardedRef<HTMLParagraphElement>,
) => (
<p
Expand All @@ -28,7 +28,7 @@ export const Paragraph = forwardRef(
inverseColor && 'ams-paragraph--inverse-color',
className,
)}
{...otherProps}
{...restProps}
>
{children}
</p>
Expand Down

0 comments on commit c869a95

Please sign in to comment.