Skip to content

Commit

Permalink
chore(Step): fix types error and clean eslint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
YSMJ1994 committed Apr 3, 2024
1 parent f14e9f6 commit 209dc14
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions components/step/__docs__/adaptor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export default {
propsValue: _propsValue,
adaptor: ({ shape, level, state, location, width, height, data, style, ...others }: any) => {
const list = parseData(data, { parseContent: true }).filter(
({ type }) => type === NodeType.node
);
({ type }: any) => type === NodeType.node
) as any[];
const dataSouce: (ItemProps & { key: number })[] = [];
let current = 0;
list.forEach((item, index) => {
Expand Down
2 changes: 1 addition & 1 deletion components/step/__docs__/demo/read-only/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Step, Button } from '@alifd/next';
import { StepProps } from '@alifd/meet-react/lib/step';
import type { StepProps } from '@alifd/meet-react/lib/step';

const StepItem = Step.Item,
ButtonGroup = Button.Group;
Expand Down
2 changes: 1 addition & 1 deletion components/step/__docs__/theme/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { type ReactNode } from 'react';
import ReactDOM from 'react-dom';
import { Demo, DemoGroup, initDemo, DemoFunctionDefineForObject } from '../../../demo-helper';
import { Demo, DemoGroup, initDemo, type DemoFunctionDefineForObject } from '../../../demo-helper';
import Step from '../../index';
import type { StepDirection, ItemProps, StepShape } from '../../types';
import '../../style';
Expand Down
8 changes: 4 additions & 4 deletions components/step/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { type ReactNode } from 'react';
import { CommonProps } from '../util';
import type React from 'react';
import type { CommonProps } from '../util';

type HTMLAttributesWeak<T> = Omit<
React.HTMLAttributes<T>,
Expand Down Expand Up @@ -167,8 +167,8 @@ export interface StepProps
itemRender?: (
index: number,
status: StepStatus,
title?: ReactNode,
content?: ReactNode
title?: React.ReactNode,
content?: React.ReactNode
) => React.ReactNode;

/**
Expand Down

0 comments on commit 209dc14

Please sign in to comment.