Skip to content

Commit bc93b50

Browse files
authored
Merge pull request #43 from yjose/fix/clean_code
Fix/clean code
2 parents 5799036 + 09ae86d commit bc93b50

16 files changed

+519
-554
lines changed

__test__/__snapshots__/index.test.js.snap

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

__test__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import { shallow, mount } from "enzyme";
33
import Enzyme from "enzyme";
4-
import Popup from "../src/Popup";
4+
import Popup from "../src/";
55
import { shallowToJson } from "enzyme-to-json";
66
import { cleanup, fireEvent, render, waitForElement } from "react-testing-library";
77

build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const pkg = require("./package.json");
66
const Bili = require("bili");
77

88
const options = {
9-
input: "./src/Popup.js",
9+
input: "./src/index.js",
1010
outDir: "lib",
1111
name: "reactjs-popup",
1212
format: ["es", "cjs", "umd", "umd-min"],

src/Popup.js

Lines changed: 0 additions & 333 deletions
This file was deleted.
File renamed without changes.

src/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ declare module 'reactjs-popup' {
55
type Position = 'top left' | 'top right' | 'bottom right' | 'bottom left' | 'right center' | 'left center' | 'top center' | 'bottom center';
66

77
interface Props {
8-
trigger: JSX.Element | ((isOpen: boolean) => JSX.Element);
8+
trigger?: JSX.Element | ((isOpen: boolean) => JSX.Element);
99
open?: boolean;
1010
defaultOpen?: boolean;
1111
on?: EventType | EventType[];

0 commit comments

Comments
 (0)