Skip to content

Commit

Permalink
Merge pull request #25 from demetrius-mp/feat/typescript-support
Browse files Browse the repository at this point in the history
feat: typescript declarations
  • Loading branch information
himynameisdave committed May 1, 2022
2 parents db5b404 + 8a7c591 commit 5bbdb4e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/Flex.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { SvelteComponentTyped } from "svelte";

declare type Align = "start" | "center" | "end" | "stretch";

declare type Justify =
| "start"
| "center"
| "end"
| "around"
| "between"
| "evenly";

declare type Direction = "row" | "column";

export interface FlexProps {
align?: Align;
justify?: Justify;
direction?: Direction;
reverse?: boolean;
}

export default class Flex extends SvelteComponentTyped<FlexProps> {}
3 changes: 3 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Flex from "./Flex";

export { Flex };

0 comments on commit 5bbdb4e

Please sign in to comment.