Skip to content

Commit

Permalink
docs : update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Pol Moneys committed Jan 26, 2023
1 parent cc8d32b commit f5a6014
Show file tree
Hide file tree
Showing 7 changed files with 198 additions and 197 deletions.
93 changes: 0 additions & 93 deletions demo/dist/assets/index.9a928edd.js

This file was deleted.

93 changes: 93 additions & 0 deletions demo/dist/assets/index.e7150dcf.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" type="image/x-icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAnCAYAAABuf0pMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA91pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wT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TSLUJtMqGIUSoyQPir7RywBUgXk+gzzCZ1gXRAzxyH+lREvLgkWOlhwOGX10gjkdehAp28OGREwA1yU4D8R8cCi5RwQGgRHsLh9wncgwkpWc0mgiHpwP48ciJkTM+QE6qfoalfcBIRE8bAwAEGAB3Zn/EArOaDQAAAABJRU5ErkJggg==" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hospitality</title>
<script type="module" crossorigin src="/assets/index.9a928edd.js"></script>
<script type="module" crossorigin src="/assets/index.e7150dcf.js"></script>
<link rel="stylesheet" href="/assets/index.2f6bbd67.css">
</head>
<body>
Expand Down
19 changes: 10 additions & 9 deletions demo/src/stories/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Dispatch, SetStateAction } from "react";
import { Hospitality, UnavailableSpots } from "hospitality-react";
import { useControls, folder, button } from "leva";
import { Variants } from "../App";
import Cam from "./camera";
// import Cam from "./camera";
import Mapped from "./mapped";
import Spot from "./spot";

Expand All @@ -15,22 +15,23 @@ interface Props {
function Stories(props: Props) {
const { setter } = props;

const { columns, rows, show, rowShape, unavailable } = useControls({
const { columns, rows, show, shape, unavailable } = useControls({
basic: folder(
{
rows: 8,
columns: 8,
},
{ color: "yellow" }
),
show: { value: false, label: "customize row shape" },
show: { value: false, label: "customize shape" },

rowShape: folder(
shape: folder(
{
rowShape: {
label: "sum of array must be === to rows",
shape: {
label: "sum of array must be === to columns",
min: 1,
max: 9,
step: 1,
render: get => get("show"),
value: [2, 4, 2],
},
Expand All @@ -45,7 +46,7 @@ function Stories(props: Props) {
unavailable: {
label: "Disable spot on row 1",
min: 1,
max: 9,
max: 8,
value: 4,
step: 1,
optional: true,
Expand All @@ -72,7 +73,7 @@ function Stories(props: Props) {
visual={{
columns,
rows,
...(show && { rowShape }),
...(show && { shape }),
}}
onSelect={spot => console.log({ spot })}
unavailable={busySpots}
Expand All @@ -82,7 +83,7 @@ function Stories(props: Props) {
}

Stories.Map = Mapped;
Stories.Camera = Cam;
// Stories.Camera = Cam;
Stories.Spot = Spot;

export default Stories;
93 changes: 0 additions & 93 deletions docs/assets/index.9a928edd.js

This file was deleted.

93 changes: 93 additions & 0 deletions docs/assets/index.e7150dcf.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script
type="module"
crossorigin
src="/hospitality-react/assets/index.9a928edd.js"
src="/hospitality-react/assets/index.e7150dcf.js"
></script>
<link
rel="stylesheet"
Expand Down

0 comments on commit f5a6014

Please sign in to comment.