Skip to content

Commit c5f6cc8

Browse files
committed
Implement effect
1 parent 87b391f commit c5f6cc8

File tree

8 files changed

+1487
-350
lines changed

8 files changed

+1487
-350
lines changed

src/Element.ts

Lines changed: 186 additions & 158 deletions
Large diffs are not rendered by default.

src/__tests__/Element.test.ts

Lines changed: 674 additions & 132 deletions
Large diffs are not rendered by default.

src/__tests__/utils.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ import {
99
describe('organizeProps', () => {
1010
it('should organize props', () => {
1111
expect(organizeProps({})).toEqual({})
12+
13+
expect(organizeProps({ aspectRatio: '1/1' })).toEqual({
14+
aspectRatio: '1',
15+
})
1216
})
1317
it.each(['p', 'm'])('should organize space props', (pro) => {
1418
expect(organizeProps({ [pro]: '10px 10px 10px 10px' })).toEqual({
@@ -67,6 +71,11 @@ describe('organizeProps', () => {
6771
[pro + 'r']: '8px',
6872
[pro + 'l']: '6px',
6973
})
74+
expect(organizeProps({ [pro]: '10px 9px 8px 9px' })).toEqual({
75+
[pro + 't']: '10px',
76+
[pro + 'x']: '9px',
77+
[pro + 'b']: '8px',
78+
})
7079
})
7180

7281
it('should organize space props 2', () => {

0 commit comments

Comments
 (0)