Skip to content

Commit

Permalink
refactor: make web as default implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmydel committed Aug 24, 2023
1 parent b0ac9e7 commit 0244f7a
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 39 deletions.
11 changes: 11 additions & 0 deletions src/decorators/OpacityDecorator/index.native.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import { OpacityDecorator as OpacityDecoratorDraggableFlatlist } from 'react-native-draggable-flatlist';
import type { Props } from '../types';

export function OpacityDecorator({ children }: Props) {
return (
<OpacityDecoratorDraggableFlatlist>
{children}
</OpacityDecoratorDraggableFlatlist>
);
}
8 changes: 1 addition & 7 deletions src/decorators/OpacityDecorator/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import React from 'react';
import { OpacityDecorator as OpacityDecoratorDraggableFlatlist } from 'react-native-draggable-flatlist';
import type { Props } from '../types';

export function OpacityDecorator({ children }: Props) {
return (
<OpacityDecoratorDraggableFlatlist>
{children}
</OpacityDecoratorDraggableFlatlist>
);
return children;
}
5 changes: 0 additions & 5 deletions src/decorators/OpacityDecorator/index.web.tsx

This file was deleted.

11 changes: 11 additions & 0 deletions src/decorators/ScaleDecorator/index.native.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import { ScaleDecorator as ScaleDecoratorDraggableFlatlist } from 'react-native-draggable-flatlist';
import type { Props } from '../types';

export function ScaleDecorator({ children }: Props) {
return (
<ScaleDecoratorDraggableFlatlist>
{children}
</ScaleDecoratorDraggableFlatlist>
);
}
8 changes: 1 addition & 7 deletions src/decorators/ScaleDecorator/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import React from 'react';
import { ScaleDecorator as ScaleDecoratorDraggableFlatlist } from 'react-native-draggable-flatlist';
import type { Props } from '../types';

export function ScaleDecorator({ children }: Props) {
return (
<ScaleDecoratorDraggableFlatlist>
{children}
</ScaleDecoratorDraggableFlatlist>
);
return children;
}
5 changes: 0 additions & 5 deletions src/decorators/ScaleDecorator/index.web.tsx

This file was deleted.

11 changes: 11 additions & 0 deletions src/decorators/ShadowDecorator/index.native.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import { ShadowDecorator as ShadowDecoratorDraggableFlatlist } from 'react-native-draggable-flatlist';
import type { Props } from '../types';

export function ShadowDecorator({ children }: Props) {
return (
<ShadowDecoratorDraggableFlatlist>
{children}
</ShadowDecoratorDraggableFlatlist>
);
}
8 changes: 1 addition & 7 deletions src/decorators/ShadowDecorator/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import React from 'react';
import { ShadowDecorator as ShadowDecoratorDraggableFlatlist } from 'react-native-draggable-flatlist';
import type { Props } from '../types';

export function ShadowDecorator({ children }: Props) {
return (
<ShadowDecoratorDraggableFlatlist>
{children}
</ShadowDecoratorDraggableFlatlist>
);
return children;
}
5 changes: 0 additions & 5 deletions src/decorators/ShadowDecorator/index.web.tsx

This file was deleted.

6 changes: 3 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DraggableList } from './DraggableList';
import 'react-native-gesture-handler';

export { OpacityDecorator } from './decorators/OpacityDecorator';
export { ScaleDecorator } from './decorators/ScaleDecorator';
export { ShadowDecorator } from './decorators/ShadowDecorator';
export { OpacityDecorator } from './decorators/OpacityDecorator/index.native';
export { ScaleDecorator } from './decorators/ScaleDecorator/index.native';
export { ShadowDecorator } from './decorators/ShadowDecorator/index.native';

export default DraggableList;

0 comments on commit 0244f7a

Please sign in to comment.