@rpg-engine/long-bow 0.1.21 → 0.1.24

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,48 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ import { RPGUIRoot } from '../RPGUI/RPGUIRoot';
4
+
5
+ export interface IListMenuProps {
6
+ title: string;
7
+ options: [
8
+ {
9
+ id: string;
10
+ text: string;
11
+ }
12
+ ];
13
+ onSelected: (selectedOptionId: string) => void;
14
+ }
15
+
16
+ export const ListMenu: React.FC<IListMenuProps> = ({
17
+ title,
18
+ options,
19
+ onSelected,
20
+ }) => {
21
+ return (
22
+ <RPGUIRoot>
23
+ <Container>
24
+ <p>{title}: </p>
25
+ <ul className="rpgui-list-imp" style={{ overflow: 'hidden' }}>
26
+ {options.map((params) => (
27
+ <li
28
+ key={params.text}
29
+ onClick={() => {
30
+ onSelected(params.id);
31
+ }}
32
+ >
33
+ {params.text}
34
+ </li>
35
+ ))}
36
+ </ul>
37
+ </Container>
38
+ </RPGUIRoot>
39
+ );
40
+ };
41
+
42
+ const Container = styled.div`
43
+ display: flex;
44
+ flex-direction: column;
45
+ width: 100%;
46
+ justify-content: start;
47
+ align-items: flex-start;
48
+ `;
package/src/index.tsx CHANGED
@@ -1,4 +1,8 @@
1
+ export * from './components/ListMenu';
2
+ export { useEventListener } from './hooks/useEventListener';
1
3
  export * from './NPCDialog/NPCDialog';
2
- export * from './RPGUI/RPGUI';
4
+ export * from './NPCDialog/QuestionDialog/QuestionDialog';
3
5
  export * from './RPGUI/RPGUIContainer';
6
+ export * from './RPGUI/RPGUIRoot';
7
+ export * from './RPGUI/RPGUISlider';
4
8
  export * from './typography/DynamicText';
@@ -45,4 +45,5 @@ const TextContainer = styled.p`
45
45
  color: white;
46
46
  text-shadow: 1px 1px 0px #000000;
47
47
  letter-spacing: 1.2px;
48
+ word-break: normal;
48
49
  `;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import 'rpgui/rpgui.css';
3
- import 'rpgui/rpgui.js';
4
- interface IProps {
5
- children: React.ReactNode;
6
- }
7
- export declare const RPGUI: React.FC<IProps>;
8
- export {};
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import 'rpgui/rpgui.css';
3
- import 'rpgui/rpgui.js';
4
-
5
- interface IProps {
6
- children: React.ReactNode;
7
- }
8
-
9
- export const RPGUI: React.FC<IProps> = ({ children }) => {
10
- return <div className="rpgui-content">{children}</div>;
11
- };