Skip to content

Commit 2ccda4c

Browse files
authored
Remove color prop from Anchor component (#2948)
1 parent 0cc2af2 commit 2ccda4c

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.changeset/cyan-buckets-draw.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@sumup-oss/circuit-ui": patch
3+
---
4+
5+
Removed the `color` prop from the Anchor component's prop types as it's not supported.

packages/circuit-ui/components/Anchor/Anchor.tsx

+9-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { utilClasses } from '../../styles/utility.js';
3333

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

36-
export interface BaseProps extends BodyProps {
36+
export interface BaseProps extends Omit<BodyProps, 'color'> {
3737
children: ReactNode;
3838
/**
3939
* Function that's called when the button is clicked.
@@ -44,8 +44,14 @@ export interface BaseProps extends BodyProps {
4444
*/
4545
ref?: Ref<any>;
4646
}
47-
type LinkElProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick'>;
48-
type ButtonElProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'>;
47+
type LinkElProps = Omit<
48+
AnchorHTMLAttributes<HTMLAnchorElement>,
49+
'onClick' | 'color'
50+
>;
51+
type ButtonElProps = Omit<
52+
ButtonHTMLAttributes<HTMLButtonElement>,
53+
'onClick' | 'color'
54+
>;
4955

5056
export type AnchorProps = BaseProps & LinkElProps & ButtonElProps;
5157

0 commit comments

Comments
 (0)