Skip to content

Commit c452c1f

Browse files
committed
refactor: use named export instead of default export
1 parent aaba658 commit c452c1f

6 files changed

Lines changed: 4 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ No additional setup required for Android.
5353
```tsx
5454
import React, { useState } from 'react';
5555
import { View } from 'react-native';
56-
import Switch from '@minkyumdev/react-native-switch';
56+
import { Switch } from '@minkyumdev/react-native-switch';
5757

5858
function App() {
5959
const [isEnabled, setIsEnabled] = useState(false);
@@ -183,7 +183,7 @@ See the [Props](#props) table above for detailed information.
183183
#### Example
184184

185185
```tsx
186-
import Switch from '@minkyumdev/react-native-switch';
186+
import { Switch } from '@minkyumdev/react-native-switch';
187187

188188
function MyComponent() {
189189
const [enabled, setEnabled] = useState(false);

dist/index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,4 @@ export declare const SWITCH_ANIMATION_DURATION = 150;
8989
* ```
9090
*/
9191
export declare const Switch: React.FC<SwitchProps>;
92-
export default Switch;
9392
//# sourceMappingURL=index.d.ts.map

dist/index.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,5 +277,3 @@ export const Switch: React.FC<SwitchProps> = React.memo<SwitchProps>(
277277
);
278278
},
279279
);
280-
281-
export default Switch;

0 commit comments

Comments
 (0)