Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dist/*.ts
dist/**/*.ts
dist/*.js
dist/**/*.js
build/**/*.js
craco.config.ts
rollup.config.js
node_modules
37 changes: 37 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"react-app",
"react-app/jest",
"airbnb",
"airbnb-typescript",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["./tsconfig.json"]
},
"plugins": ["react", "@typescript-eslint"],
"overrides": [
{
"files": ["*.ts", "*.tsx"]
}
],
"rules": {
"react/jsx-uses-react": ["off"],
"react/react-in-jsx-scope": ["off"],
"react/jsx-props-no-spreading": ["off"],
"react/require-default-props": "off",
"react/prop-types": "off",
"no-shadow": "off"
}
}
4,034 changes: 4,034 additions & 0 deletions bundle-analysis.html

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions craco.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export default {
};
20 changes: 20 additions & 0 deletions dist/cjs/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/cjs/index.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/cjs/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
10 changes: 10 additions & 0 deletions dist/cjs/types/lib/Flippy.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { HTMLAttributes } from "react";
import "./styles.css";
export interface FlippyProps extends HTMLAttributes<HTMLDivElement> {
flipDirection?: "vertical" | "horizontal";
isFlipped?: boolean;
flipOnHover?: boolean;
flipOnClick?: boolean;
}
declare const Flippy: import("react").ForwardRefExoticComponent<FlippyProps & import("react").RefAttributes<unknown>>;
export default Flippy;
12 changes: 12 additions & 0 deletions dist/cjs/types/lib/FlippyCard.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { HTMLAttributes, ReactNode } from "react";
export interface FlippyCardProps extends HTMLAttributes<HTMLDivElement> {
cardType?: "back" | "front";
elementType?: string;
animationDuration?: number;
children?: ReactNode;
}
export interface FrontBackSideProps extends FlippyCardProps {
isFlipped?: boolean;
}
export declare function FrontSide({ isFlipped, style, animationDuration, ...props }: FrontBackSideProps): JSX.Element;
export declare function BackSide({ isFlipped, style, ...props }: FrontBackSideProps): JSX.Element;
4 changes: 4 additions & 0 deletions dist/cjs/types/lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Flippy from "./Flippy";
export * from "./Flippy";
export * from "./FlippyCard";
export default Flippy;
20 changes: 20 additions & 0 deletions dist/esm/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/esm/index.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/esm/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
10 changes: 10 additions & 0 deletions dist/esm/types/lib/Flippy.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { HTMLAttributes } from "react";
import "./styles.css";
export interface FlippyProps extends HTMLAttributes<HTMLDivElement> {
flipDirection?: "vertical" | "horizontal";
isFlipped?: boolean;
flipOnHover?: boolean;
flipOnClick?: boolean;
}
declare const Flippy: import("react").ForwardRefExoticComponent<FlippyProps & import("react").RefAttributes<unknown>>;
export default Flippy;
12 changes: 12 additions & 0 deletions dist/esm/types/lib/FlippyCard.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { HTMLAttributes, ReactNode } from "react";
export interface FlippyCardProps extends HTMLAttributes<HTMLDivElement> {
cardType?: "back" | "front";
elementType?: string;
animationDuration?: number;
children?: ReactNode;
}
export interface FrontBackSideProps extends FlippyCardProps {
isFlipped?: boolean;
}
export declare function FrontSide({ isFlipped, style, animationDuration, ...props }: FrontBackSideProps): JSX.Element;
export declare function BackSide({ isFlipped, style, ...props }: FrontBackSideProps): JSX.Element;
4 changes: 4 additions & 0 deletions dist/esm/types/lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Flippy from "./Flippy";
export * from "./Flippy";
export * from "./FlippyCard";
export default Flippy;
205 changes: 0 additions & 205 deletions dist/index.cjs.js

This file was deleted.

24 changes: 24 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import * as react from 'react';
import { HTMLAttributes, ReactNode } from 'react';

interface FlippyProps extends HTMLAttributes<HTMLDivElement> {
flipDirection?: "vertical" | "horizontal";
isFlipped?: boolean;
flipOnHover?: boolean;
flipOnClick?: boolean;
}
declare const Flippy: react.ForwardRefExoticComponent<FlippyProps & react.RefAttributes<unknown>>;

interface FlippyCardProps extends HTMLAttributes<HTMLDivElement> {
cardType?: "back" | "front";
elementType?: string;
animationDuration?: number;
children?: ReactNode;
}
interface FrontBackSideProps extends FlippyCardProps {
isFlipped?: boolean;
}
declare function FrontSide({ isFlipped, style, animationDuration, ...props }: FrontBackSideProps): JSX.Element;
declare function BackSide({ isFlipped, style, ...props }: FrontBackSideProps): JSX.Element;

export { BackSide, FlippyCardProps, FlippyProps, FrontBackSideProps, FrontSide, Flippy as default };
Loading