Skip to content

Commit

Permalink
feat(types): component prop types are now exported
Browse files Browse the repository at this point in the history
Closes #79
  • Loading branch information
Dennis Morello committed Jun 9, 2021
1 parent b2926d2 commit be1e2c1
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 21 deletions.
3 changes: 2 additions & 1 deletion src/components/AttentionSeeker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ type AttentionSeekerEffect =
| "tada"
| "wobble";

interface AttentionSeekerProps extends Omit<RevealProps, "keyframes" | "css"> {
export interface AttentionSeekerProps
extends Omit<RevealProps, "keyframes" | "css"> {
/**
* The animation effect to use for this attention seeker.
* @default "bounce"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Bounce.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Reveal, { RevealProps } from "../Reveal";

type BounceDirection = "down" | "left" | "right" | "up";

interface BounceProps extends Omit<RevealProps, "keyframes" | "css"> {
export interface BounceProps extends Omit<RevealProps, "keyframes" | "css"> {
/**
* Origin of the animation.
* @default undefined
Expand Down
2 changes: 1 addition & 1 deletion src/components/Fade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type FadeDirection =
| "top-right"
| "up";

interface FadeProps extends Omit<RevealProps, "keyframes" | "css"> {
export interface FadeProps extends Omit<RevealProps, "keyframes" | "css"> {
/**
* Causes the animation to start farther. Only works with "down", "left", "right" and "up" directions.
* @default false
Expand Down
2 changes: 1 addition & 1 deletion src/components/Flip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Reveal, { RevealProps } from "../Reveal";

type FlipDirection = "horizontal" | "vertical";

interface FlipProps extends Omit<RevealProps, "keyframes" | "css"> {
export interface FlipProps extends Omit<RevealProps, "keyframes" | "css"> {
/**
* Axis direction of the animation.
* @default undefined
Expand Down
2 changes: 1 addition & 1 deletion src/components/Hinge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Interpolation, Theme } from "@emotion/react";
import { hinge } from "../animations/specials";
import Reveal, { RevealProps } from "../Reveal";

type HingeProps = Omit<RevealProps, "keyframes" | "css">;
export type HingeProps = Omit<RevealProps, "keyframes" | "css">;

const Hinge: React.FC<HingeProps> = (props) => {
const animationCss: Interpolation<Theme> = { transformOrigin: "top left" };
Expand Down
2 changes: 1 addition & 1 deletion src/components/JackInTheBox.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { jackInTheBox } from "../animations/specials";
import Reveal, { RevealProps } from "../Reveal";

type JackInTheBoxProps = Omit<RevealProps, "keyframes" | "css">;
export type JackInTheBoxProps = Omit<RevealProps, "keyframes" | "css">;

const JackInTheBox: React.FC<JackInTheBoxProps> = (props) => {
return <Reveal keyframes={jackInTheBox} {...props} />;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Roll.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { rollIn, rollOut } from "../animations/specials";
import Reveal, { RevealProps } from "../Reveal";

interface RollProps extends Omit<RevealProps, "keyframes" | "css"> {
export interface RollProps extends Omit<RevealProps, "keyframes" | "css"> {
/**
* Specifies if the animation should make element(s) disappear.
* @default false
Expand Down
2 changes: 1 addition & 1 deletion src/components/Rotate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type RotateDirection =
| "top-left"
| "top-right";

interface RotateProps extends Omit<RevealProps, "keyframes" | "css"> {
export interface RotateProps extends Omit<RevealProps, "keyframes" | "css"> {
/**
* Origin of the animation.
* @default undefined
Expand Down
2 changes: 1 addition & 1 deletion src/components/Slide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Reveal, { RevealProps } from "../Reveal";

type SlideDirection = "down" | "left" | "right" | "up";

interface SlideProps extends Omit<RevealProps, "keyframes" | "css"> {
export interface SlideProps extends Omit<RevealProps, "keyframes" | "css"> {
/**
* Origin of the animation.
* @default undefined
Expand Down
2 changes: 1 addition & 1 deletion src/components/Zoom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Reveal, { RevealProps } from "../Reveal";

type ZoomDirection = "down" | "left" | "right" | "up";

interface ZoomProps extends Omit<RevealProps, "keyframes" | "css"> {
export interface ZoomProps extends Omit<RevealProps, "keyframes" | "css"> {
/**
* Origin of the animation.
* @default undefined
Expand Down
29 changes: 18 additions & 11 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
import Reveal from "./Reveal";
import Reveal, { RevealProps } from "./Reveal";

export { default as AttentionSeeker } from "./components/AttentionSeeker";
export { default as Bounce } from "./components/Bounce";
export { default as Fade } from "./components/Fade";
export { default as Flip } from "./components/Flip";
export { default as Hinge } from "./components/Hinge";
export { default as JackInTheBox } from "./components/JackInTheBox";
export { default as Roll } from "./components/Roll";
export { default as Rotate } from "./components/Rotate";
export { default as Slide } from "./components/Slide";
export { default as Zoom } from "./components/Zoom";
export {
default as AttentionSeeker,
AttentionSeekerProps,
} from "./components/AttentionSeeker";
export { default as Bounce, BounceProps } from "./components/Bounce";
export { default as Fade, FadeProps } from "./components/Fade";
export { default as Flip, FlipProps } from "./components/Flip";
export { default as Hinge, HingeProps } from "./components/Hinge";
export {
default as JackInTheBox,
JackInTheBoxProps,
} from "./components/JackInTheBox";
export { default as Roll, RollProps } from "./components/Roll";
export { default as Rotate, RotateProps } from "./components/Rotate";
export { default as Slide, SlideProps } from "./components/Slide";
export { default as Zoom, ZoomProps } from "./components/Zoom";

export { Reveal, RevealProps };
export default Reveal;

0 comments on commit be1e2c1

Please sign in to comment.