Skip to content

Commit

Permalink
fix: base svg elements props type
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamKelley committed May 24, 2024
1 parent 997f5fa commit a612a8f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
5 changes: 3 additions & 2 deletions packages/components/src/ArcCircle/ArcCircleProps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { HTMLAttributes } from 'react';
import React from 'react';
import { ArcOut } from '../Arc/generateArc';

export interface ArcCircleProps extends HTMLAttributes<SVGPathElement> {
export interface ArcCircleProps
extends React.SVGTextElementAttributes<SVGPathElement> {
/**
* The value at which the point is located.
*/
Expand Down
5 changes: 3 additions & 2 deletions packages/components/src/ArcSweep/ArcSweepProps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { HTMLAttributes } from 'react';
import React from 'react';
import { ArcOut } from '../Arc/generateArc';

export interface ArcSweepProps extends HTMLAttributes<SVGPathElement> {
export interface ArcSweepProps
extends React.SVGTextElementAttributes<SVGPathElement> {
/**
* The value from which the arc sweep starts. Defaults to the minimum value.
*/
Expand Down
5 changes: 3 additions & 2 deletions packages/components/src/ArcUnitLabel/ArcUnitLabelProps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { HTMLAttributes } from 'react';
import React from 'react';
import { ArcOut } from '../Arc/generateArc';

export interface ArcUnitLabelProps extends HTMLAttributes<SVGTextElement> {
export interface ArcUnitLabelProps
extends React.SVGTextElementAttributes<SVGTextElement> {
/**
* The value at which the unit label is located.
*/
Expand Down
7 changes: 5 additions & 2 deletions packages/components/src/Chart/ChartProps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { HTMLAttributes } from 'react';
import React from 'react';

export interface ChartProps
extends Omit<HTMLAttributes<SVGSVGElement>, 'width' | 'height'> {
extends Omit<
React.SVGTextElementAttributes<SVGSVGElement>,
'width' | 'height'
> {
/**
* The width of the container.
*/
Expand Down

0 comments on commit a612a8f

Please sign in to comment.