Skip to content

Commit e2befa6

Browse files
committed
WIP: port from vue custom directive to react hook
1 parent abd8ba9 commit e2befa6

15 files changed

+581
-1967
lines changed

__tests__/default-options.test.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { DEFAULT_PLUGIN_OPTIONS } from '../src/options'
1+
import { DEFAULT_OPTIONS } from '../src/options'
22

33
test('has documented default options', () => {
4-
expect(DEFAULT_PLUGIN_OPTIONS).toEqual({
5-
directive: 'wave',
4+
expect(DEFAULT_OPTIONS).toEqual({
65
color: 'currentColor',
76
initialOpacity: 0.2,
87
finalOpacity: 0.1,
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createWaveElement } from '../../src/utils/createWaveElement'
2-
import { IVWaveDirectiveOptions } from '../../src/options'
2+
import { IUseWaveOptions } from '../../src/options'
33

44
test('createWaveElement returns a <div>', () => {
5-
expect(createWaveElement(0, 0, 0, {} as IVWaveDirectiveOptions)).toBeInstanceOf(HTMLDivElement)
5+
expect(createWaveElement(0, 0, 0, {} as IUseWaveOptions)).toBeInstanceOf(HTMLDivElement)
66
})

__tests__/unit/hookKeys.test.ts

-27
This file was deleted.

__tests__/unit/isVue3.test.ts

-20
This file was deleted.

__tests__/unit/wave-count.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { decrementWaveCount, deleteWaveCount, getWaveCount, incrementWaveCount } from '../../src/utils/wave-count'
22

3-
const WAVE_COUNT = 'vWaveCountInternal'
3+
const WAVE_COUNT = 'useWaveCountInternal'
44

55
describe('wave-count', () => {
66
test('gets correct wave count from element', () => {

0 commit comments

Comments
 (0)