5 |
9 |
15 |
22 |
23 |
24 | `;
25 |
--------------------------------------------------------------------------------
/packages/journey-map/src/utils/length.test.ts:
--------------------------------------------------------------------------------
1 | import { calcStageLength } from './length';
2 |
3 | describe('calcStageLength', () => {
4 | it('前后符合目标值', () => {
5 | expect(
6 | calcStageLength({
7 | totalCount: 21,
8 | actionCount: 3,
9 | stageCount: 5,
10 | index: 0,
11 | }).width,
12 | ).toEqual(11.25);
13 | });
14 | it('中间符合目标值', () => {
15 | expect(
16 | calcStageLength({
17 | totalCount: 21,
18 | actionCount: 4,
19 | stageCount: 5,
20 | index: 1,
21 | }).width,
22 | ).toEqual(17.5);
23 | });
24 | });
25 |
--------------------------------------------------------------------------------
/packages/sortable-list/src/components/Handle/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import { Action, ActionProps } from '../Action';
4 |
5 | export const Handle = (props: ActionProps) => (
6 |