@rpg-engine/long-bow 0.5.84 → 0.5.86

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.
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export interface ICheckItemProps {
3
+ label: string;
4
+ defaultValue?: boolean;
5
+ onChange: (label: string, selected: boolean) => void;
6
+ }
7
+ export declare const CheckItem: React.FC<ICheckItemProps>;
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from './components/Chat/Chat';
5
5
  export * from './components/ChatRevamp/ChatRevamp';
6
6
  export * from './components/Chatdeprecated/ChatDeprecated';
7
7
  export * from './components/CheckButton';
8
+ export * from './components/CheckItem';
8
9
  export * from './components/CircularController/CircularController';
9
10
  export * from './components/CraftBook/CraftBook';
10
11
  export * from './components/DraggableContainer';
@@ -13249,6 +13249,27 @@ var CheckButton = function CheckButton(_ref) {
13249
13249
  }));
13250
13250
  };
13251
13251
 
13252
+ var CheckItem = function CheckItem(_ref) {
13253
+ var label = _ref.label,
13254
+ _ref$defaultValue = _ref.defaultValue,
13255
+ defaultValue = _ref$defaultValue === void 0 ? false : _ref$defaultValue,
13256
+ onChange = _ref.onChange;
13257
+ var _useState = React.useState(defaultValue),
13258
+ checked = _useState[0],
13259
+ setChecked = _useState[1];
13260
+ var handleClick = function handleClick() {
13261
+ var newCheckedState = !checked;
13262
+ setChecked(newCheckedState);
13263
+ onChange(label, newCheckedState);
13264
+ };
13265
+ return React__default.createElement("div", null, React__default.createElement("input", {
13266
+ className: "rpgui-checkbox",
13267
+ type: "checkbox",
13268
+ checked: checked,
13269
+ onChange: handleClick
13270
+ }), React__default.createElement("label", null, label), React__default.createElement("br", null));
13271
+ };
13272
+
13252
13273
  var SingleShortcut = /*#__PURE__*/styled__default.button.withConfig({
13253
13274
  displayName: "SingleShortcut",
13254
13275
  componentId: "sc-vz5ev8-0"
@@ -19358,6 +19379,7 @@ exports.Chat = Chat;
19358
19379
  exports.ChatDeprecated = ChatDeprecated;
19359
19380
  exports.ChatRevamp = ChatRevamp;
19360
19381
  exports.CheckButton = CheckButton;
19382
+ exports.CheckItem = CheckItem;
19361
19383
  exports.CircularController = CircularController;
19362
19384
  exports.CraftBook = CraftBook;
19363
19385
  exports.DraggableContainer = DraggableContainer;