@rpg-engine/long-bow 0.2.45 → 0.2.47
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/dist/components/StaticBook/StaticBook.d.ts +5 -8
- package/dist/components/TimeWidget/DayNightPeriod/DayNightPeriod.d.ts +6 -0
- package/dist/components/TimeWidget/TimeWidget.d.ts +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +65 -12
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +66 -14
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/DayNightPeriod.stories.d.ts +2 -2
- package/dist/stories/StaticBook.stories.d.ts +2 -2
- package/dist/stories/TimeWidget.stories.d.ts +5 -0
- package/package.json +2 -2
- package/src/components/Item/Inventory/ItemSlot.tsx +35 -17
- package/src/components/StaticBook/StaticBook.tsx +85 -76
- package/src/components/TimeWidget/DayNightPeriod/DayNightPeriod.tsx +31 -0
- package/src/components/{DayNightPeriod/Gif/Afternoon.gif → TimeWidget/DayNightPeriod/gif/afternoon.gif} +0 -0
- package/src/components/{DayNightPeriod/Gif/Morning.gif → TimeWidget/DayNightPeriod/gif/morning.gif} +0 -0
- package/src/components/{DayNightPeriod/Gif/Night.gif → TimeWidget/DayNightPeriod/gif/night.gif} +0 -0
- package/src/components/TimeWidget/TimeWidget.tsx +63 -0
- package/src/components/TimeWidget/img/clockwidget.png +0 -0
- package/src/components/shared/Ellipsis.tsx +1 -1
- package/src/index.tsx +1 -0
- package/src/mocks/itemContainer.mocks.ts +46 -12
- package/src/stories/DayNightPeriod.stories.tsx +15 -8
- package/src/stories/StaticBook.stories.tsx +16 -23
- package/src/stories/TimeWidget.stories.tsx +27 -0
- package/dist/components/DayNightPeriod/DayNightPeriod.d.ts +0 -11
- package/src/components/DayNightPeriod/DayNightPeriod.tsx +0 -36
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PeriodOfDay } from '@rpg-engine/shared';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { RPGUIRoot } from '../components/RPGUIRoot';
|
|
5
|
+
import {
|
|
6
|
+
IClockWidgetProps,
|
|
7
|
+
TimeWidget,
|
|
8
|
+
} from '../components/TimeWidget/TimeWidget';
|
|
9
|
+
|
|
10
|
+
const meta: Meta = {
|
|
11
|
+
title: 'Time Widget',
|
|
12
|
+
component: TimeWidget,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
|
|
17
|
+
const Template: Story<IClockWidgetProps> = args => (
|
|
18
|
+
<RPGUIRoot>
|
|
19
|
+
<TimeWidget {...args} />
|
|
20
|
+
</RPGUIRoot>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export const Default = Template.bind({});
|
|
24
|
+
Default.args = {
|
|
25
|
+
TimeClock: '10:00',
|
|
26
|
+
periodOfDay: PeriodOfDay.Morning,
|
|
27
|
+
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare enum IPeriodOfDay {
|
|
3
|
-
Morning = "static/media/src/components/DayNightPeriod/Gif/Morning.gif",
|
|
4
|
-
Afternoon = "static/media/src/components/DayNightPeriod/Gif/Afternoon.gif",
|
|
5
|
-
Night = "static/media/src/components/DayNightPeriod/Gif/Night.gif"
|
|
6
|
-
}
|
|
7
|
-
export interface PeriodOfDayProps {
|
|
8
|
-
periodOfDay: IPeriodOfDay;
|
|
9
|
-
}
|
|
10
|
-
export declare const PeriodOfDay: React.FC<PeriodOfDayProps>;
|
|
11
|
-
export default PeriodOfDay;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export enum IPeriodOfDay {
|
|
6
|
-
Morning = "static/media/src/components/DayNightPeriod/Gif/Morning.gif",
|
|
7
|
-
Afternoon = "static/media/src/components/DayNightPeriod/Gif/Afternoon.gif",
|
|
8
|
-
Night = "static/media/src/components/DayNightPeriod/Gif/Night.gif",
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface PeriodOfDayProps {
|
|
12
|
-
periodOfDay: IPeriodOfDay;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export const PeriodOfDay: React.FC<PeriodOfDayProps> = ({ periodOfDay }) => {
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<GifContainer >
|
|
21
|
-
|
|
22
|
-
<img src={periodOfDay} />
|
|
23
|
-
|
|
24
|
-
</GifContainer>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
interface IPeriodOfDayProps {
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const GifContainer = styled.span<IPeriodOfDayProps>`
|
|
33
|
-
width: 100%;
|
|
34
|
-
`;
|
|
35
|
-
|
|
36
|
-
export default PeriodOfDay;
|