Skip to content
Merged
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
4 changes: 4 additions & 0 deletions src/illustrations/illustration.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { SnakesWithDirections } from "./snakes-with-directions";
import { SnakesWithOutlines } from "./snakes-with-outlines";
import { TripleSnakes } from "./triple-snakes";
import { SnakeWithPopcorn } from "./snake-with-popcorn";
import { SnakesFacingLeft } from "./snakes-facing-left";

export default {
title: "Illustrations",
Expand Down Expand Up @@ -115,3 +116,6 @@ TripleSnakesStory.args = { component: TripleSnakes };

export const SnakeWithPopcornStory = Template.bind({});
SnakeWithPopcornStory.args = { component: SnakeWithPopcorn };

export const SnakesFacingLeftStory = Template.bind({});
SnakesFacingLeftStory.args = { component: SnakesFacingLeft };
3 changes: 3 additions & 0 deletions src/illustrations/illustrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { SnakesWithCocktail } from "./snakes-with-cocktail";
import { SnakesWithDirections } from "./snakes-with-directions";
import { SnakesWithOutlines } from "./snakes-with-outlines";
import { TripleSnakes } from "./triple-snakes";
import { SnakesFacingLeft } from "./snakes-facing-left";
import { Illustration } from "./types";

export const getIllustration = (name: Illustration | undefined) => {
Expand Down Expand Up @@ -83,6 +84,8 @@ export const getIllustration = (name: Illustration | undefined) => {
return SnakeTailUp;
case "snakeWithPopcorn":
return SnakeWithPopcorn;
case "snakesFacingLeft":
return SnakesFacingLeft;
}
return null;
};
1 change: 1 addition & 0 deletions src/illustrations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ export { SnakesWithOutlines } from "./snakes-with-outlines";
export { TripleSnakes } from "./triple-snakes";
export { SnakeTailUp } from "./snake-tail-up";
export { SnakeWithPopcorn } from "./snake-with-popcorn";
export { SnakesFacingLeft } from "./snakes-facing-left";
export { getIllustration } from "./illustrations";
2 changes: 1 addition & 1 deletion src/illustrations/snake-tail-up.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ export const SnakeTailUp = (props: React.SVGProps<SVGSVGElement>) => {
</defs>
</svg>
);
}
};
194 changes: 194 additions & 0 deletions src/illustrations/snakes-facing-left.tsx

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/illustrations/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ export type Illustration =
| "snakesWithOutlines"
| "tripleSnakes"
| "snakeTailUp"
| "snakeWithPopcorn";
| "snakeWithPopcorn"
| "snakesFacingLeft";
4 changes: 3 additions & 1 deletion src/slider-grid/slider-grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type Props = {
cols: number;
mdCols?: number;
background?: "snake" | "none";
justifyContent?: "center";
justifyContent?: "left" | "center" | "right";
wrap?: "wrap" | "nowrap";
};

Expand Down Expand Up @@ -73,7 +73,9 @@ export const SliderGrid = ({
className={clsx(
`snap-x snap-mandatory overflow-x-auto flex md:-mt-2 lg:-mt-4 md:px-2 lg:px-0`,
{
"md:justify-start": justifyContent === "left",
"md:justify-center": justifyContent === "center",
"md:justify-end": justifyContent === "right",

"md:flex-wrap": wrap === "wrap",
"md:flex-nowrap": wrap === "nowrap",
Expand Down