Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Rename otherProps to restProps for consistency #1399

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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