-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Elena Banon
authored and
Elena Banon
committed
May 27, 2024
0 parents
commit efd1a31
Showing
19 changed files
with
454 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Toolkit | ||
|
||
React utility functions. | ||
|
||
[Storybook](http://toolkit.tinloof.com/) | ||
|
||
## Install | ||
|
||
``` | ||
yarn add @tinloof/toolkit | ||
``` | ||
|
||
## Usage | ||
|
||
### Stack | ||
> Requires Emotion and React. | ||
```js | ||
import { Stack } from "@tinloof/toolkit"; | ||
|
||
function App() { | ||
<Stack> | ||
... | ||
</Stack> | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/// <reference types="react" /> | ||
declare type BoxProps = { | ||
size: number; | ||
}; | ||
export default function Box({ size }: BoxProps): JSX.Element; | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ComponentStory, ComponentMeta } from "@storybook/react"; | ||
import Row from "./index"; | ||
declare const _default: ComponentMeta<typeof Row>; | ||
export default _default; | ||
export declare const Default: ComponentStory<typeof Row>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from "react"; | ||
import { responsiveProp } from "../utils"; | ||
import * as styles from "./styles"; | ||
interface RowProps { | ||
gap: responsiveProp<styles.gap>; | ||
vGap?: responsiveProp<styles.gap>; | ||
align?: responsiveProp<styles.align>; | ||
wrap?: boolean; | ||
wrapBefore?: number; | ||
children: React.ReactNode; | ||
} | ||
export default function Row({ gap, vGap, align, wrap, wrapBefore, children, }: RowProps): import("@emotion/react/jsx-runtime").JSX.Element; | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export declare type gap = "spaceBetween" | number; | ||
export declare type align = "start" | "center" | "end" | "stretch"; | ||
export declare const row: import("@emotion/react").SerializedStyles; | ||
export declare const rowWrap: (wrap: boolean) => import("@emotion/react").SerializedStyles; | ||
export declare const rowAlign: (responsiveProp: any) => import("@emotion/react").SerializedStyles | (import("@emotion/react").SerializedStyles | import("@emotion/react").SerializedStyles[] | null)[] | null; | ||
export declare const rowGap: (responsiveProp: any) => import("@emotion/react").SerializedStyles | (import("@emotion/react").SerializedStyles | import("@emotion/react").SerializedStyles[] | null)[] | null; | ||
export declare const rowVGap: (responsiveProp: any) => import("@emotion/react").SerializedStyles | (import("@emotion/react").SerializedStyles | import("@emotion/react").SerializedStyles[] | null)[] | null; | ||
export declare const wrapBefore: (screenSize: number) => import("@emotion/react").SerializedStyles; | ||
export declare const box: import("@emotion/react").SerializedStyles; | ||
export declare const boxGap: (responsiveProp: any) => import("@emotion/react").SerializedStyles | (import("@emotion/react").SerializedStyles | import("@emotion/react").SerializedStyles[] | null)[] | null; | ||
export declare const boxVGap: (responsiveProp: any) => import("@emotion/react").SerializedStyles | (import("@emotion/react").SerializedStyles | import("@emotion/react").SerializedStyles[] | null)[] | null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ComponentStory, ComponentMeta } from "@storybook/react"; | ||
import Stack from "./index"; | ||
declare const _default: ComponentMeta<typeof Stack>; | ||
export default _default; | ||
export declare const Default: ComponentStory<typeof Stack>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from "react"; | ||
import { responsiveProp } from "../utils"; | ||
import * as styles from "./styles"; | ||
declare type StackProps = { | ||
gap: responsiveProp<number>; | ||
align?: responsiveProp<styles.align>; | ||
children: React.ReactNode; | ||
}; | ||
export default function Stack({ gap, align, children }: StackProps): import("@emotion/react/jsx-runtime").JSX.Element; | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export declare type align = "start" | "center" | "end" | "stretch"; | ||
export declare const stack: import("@emotion/react").SerializedStyles; | ||
export declare const align: (responsiveProp: any) => import("@emotion/react").SerializedStyles | (import("@emotion/react").SerializedStyles | import("@emotion/react").SerializedStyles[] | null)[] | null; | ||
export declare const stackGap: (responsiveProp: any) => import("@emotion/react").SerializedStyles | (import("@emotion/react").SerializedStyles | import("@emotion/react").SerializedStyles[] | null)[] | null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { default as Row } from "./Row"; | ||
export { default as Stack } from "./Stack"; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.