Skip to content

Commit ec3d9cb

Browse files
Fix charts type issues
1 parent c8c725d commit ec3d9cb

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

packages/x-charts/src/ChartsXAxis/ChartsXAxisImpl.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ export function ChartsXAxisImpl({ axis, ...inProps }: ChartsXAxisImplProps) {
5454

5555
const axisLabelProps = useSlotProps({
5656
elementType: Label,
57+
// @ts-expect-error `useSlotProps` applies `WithCommonProps` with adds a `style: React.CSSProperties` prop automatically.
5758
externalSlotProps: slotProps?.axisLabel,
59+
// @ts-expect-error `useSlotProps` applies `WithCommonProps` with adds a `style: React.CSSProperties` prop automatically.
5860
additionalProps: {
5961
style: {
6062
...theme.typography.body1,

packages/x-charts/src/ChartsXAxis/useAxisTicksProps.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ export function useAxisTicksProps(inProps: ChartsXAxisProps) {
4141

4242
const axisTickLabelProps = useSlotProps({
4343
elementType: TickLabel,
44+
// @ts-expect-error `useSlotProps` applies `WithCommonProps` with adds a `style: React.CSSProperties` prop automatically.
4445
externalSlotProps: slotProps?.axisTickLabel,
46+
// @ts-expect-error `useSlotProps` applies `WithCommonProps` with adds a `style: React.CSSProperties` prop automatically.
4547
additionalProps: {
4648
style: {
4749
...theme.typography.caption,

packages/x-charts/src/ChartsYAxis/ChartsYAxisImpl.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ export function ChartsYAxisImpl({ axis, ...inProps }: ChartsYAxisImplProps) {
6464
});
6565
const axisLabelProps = useSlotProps({
6666
elementType: Label,
67+
// @ts-expect-error `useSlotProps` applies `WithCommonProps` with adds a `style: React.CSSProperties` prop automatically.
6768
externalSlotProps: slotProps?.axisLabel,
69+
// @ts-expect-error `useSlotProps` applies `WithCommonProps` with adds a `style: React.CSSProperties` prop automatically.
6870
additionalProps: {
6971
style: {
7072
...theme.typography.body1,

packages/x-charts/src/ChartsYAxis/useAxisTicksProps.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export function useAxisTicksProps(inProps: ChartsYAxisProps) {
4343

4444
const axisTickLabelProps = useSlotProps({
4545
elementType: TickLabel,
46+
// @ts-expect-error `useSlotProps` applies `WithCommonProps` with adds a `style: React.CSSProperties` prop automatically.
4647
externalSlotProps: slotProps?.axisTickLabel,
48+
// @ts-expect-error `useSlotProps` applies `WithCommonProps` with adds a `style: React.CSSProperties` prop automatically.
4749
additionalProps: {
4850
style: {
4951
...theme.typography.caption,

0 commit comments

Comments
 (0)