Skip to content

Commit

Permalink
feat: add more decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmydel committed Aug 24, 2023
1 parent 4ff0751 commit 30b1156
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/decorators/OpacityDecorator/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import { OpacityDecorator } from 'react-native-draggable-flatlist';
import type { Props } from '../types';

function CustomOpacityDecorator({ children }: Props) {
return <OpacityDecorator>{children}</OpacityDecorator>;
}

export { CustomOpacityDecorator as OpacityDecorator };
5 changes: 5 additions & 0 deletions src/decorators/OpacityDecorator/index.web.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { Props } from '../types';

export function OpacityDecorator({ children }: Props) {
return children;
}
2 changes: 1 addition & 1 deletion src/decorators/ScaleDecorator/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { ScaleDecorator } from 'react-native-draggable-flatlist';
import type { Props } from './types';
import type { Props } from '../types';

function CustomScaleDecorator({ children }: Props) {
return <ScaleDecorator>{children}</ScaleDecorator>;
Expand Down
2 changes: 1 addition & 1 deletion src/decorators/ScaleDecorator/index.web.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Props } from './types';
import type { Props } from '../types';

export function ScaleDecorator({ children }: Props) {
return children;
Expand Down
9 changes: 9 additions & 0 deletions src/decorators/ShadowDecorator/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import { ShadowDecorator } from 'react-native-draggable-flatlist';
import type { Props } from '../types';

function CustomShadowDecorator({ children }: Props) {
return <ShadowDecorator>{children}</ShadowDecorator>;
}

export { CustomShadowDecorator as ShadowDecorator };
5 changes: 5 additions & 0 deletions src/decorators/ShadowDecorator/index.web.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { Props } from '../types';

export function ShadowDecorator({ children }: Props) {
return children;
}
File renamed without changes.
2 changes: 2 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import 'react-native-gesture-handler';

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

0 comments on commit 30b1156

Please sign in to comment.