@edu-tosel/design 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/board/Board.js CHANGED
@@ -1,7 +1,9 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useWidgetStore } from "../store";
2
3
  export function Board({ children, widget, options }) {
4
+ const { events } = useWidgetStore();
3
5
  const { height } = options ?? {};
4
- const { events, widgets } = widget ?? {};
6
+ const { widgets } = widget ?? {};
5
7
  const classNames = [
6
8
  `min-h-screen xl:min-h-0 xl:h-186 `,
7
9
  "xl:rounded-xl bg-white/80 relative w-full ",
@@ -1,9 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { WidgetEvent } from "./Widget";
3
2
  export interface BoardProps {
4
3
  children: React.ReactNode;
5
4
  widget?: {
6
- events: WidgetEvent[];
7
5
  widgets: [[string, React.ReactNode]];
8
6
  };
9
7
  options?: {
@@ -1,4 +1,8 @@
1
1
  /// <reference types="react" />
2
- export default function TestModal({ children }: {
2
+ import { Button } from "../interface";
3
+ export default function TestModal({ children, options, }: {
3
4
  children: React.ReactNode;
5
+ options?: {
6
+ buttons?: Button[];
7
+ };
4
8
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Modal } from "./Modal";
3
- export default function TestModal({ children }) {
4
- return (_jsx(Modal, { options: { width: "lg", height: "xl", buttons: [["gd", () => { }]] }, children: _jsx("div", { className: "pt-18 pl-25", children: children }) }));
3
+ export default function TestModal({ children, options, }) {
4
+ const { buttons } = options ?? {};
5
+ return (_jsx(Modal, { options: { width: "lg", height: "xl", buttons }, children: _jsx("div", { className: "pt-18 pl-25", children: children }) }));
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1