Skip to content

Commit

Permalink
Remove color prop from Anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Feb 11, 2025
1 parent 01ffa7b commit 5cd115e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/cyan-buckets-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sumup-oss/circuit-ui": patch
---

Removed the `color` prop from the Anchor component's prop types as it's not supported.
12 changes: 9 additions & 3 deletions packages/circuit-ui/components/Anchor/Anchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { utilClasses } from '../../styles/utility.js';

import classes from './Anchor.module.css';

export interface BaseProps extends BodyProps {
export interface BaseProps extends Omit<BodyProps, 'color'> {
children: ReactNode;
/**
* Function that's called when the button is clicked.
Expand All @@ -44,8 +44,14 @@ export interface BaseProps extends BodyProps {
*/
ref?: Ref<any>;
}
type LinkElProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick'>;
type ButtonElProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'>;
type LinkElProps = Omit<
AnchorHTMLAttributes<HTMLAnchorElement>,
'onClick' | 'color'
>;
type ButtonElProps = Omit<
ButtonHTMLAttributes<HTMLButtonElement>,
'onClick' | 'color'
>;

export type AnchorProps = BaseProps & LinkElProps & ButtonElProps;

Expand Down

0 comments on commit 5cd115e

Please sign in to comment.