New source found from dndbeyond.com
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from "react";
|
||||
import { connect, DispatchProp } from "react-redux";
|
||||
import { AnyAction } from "redux";
|
||||
|
||||
import {
|
||||
AlignmentContract,
|
||||
@@ -23,7 +24,9 @@ import DescriptionPaneNumberEditor from "./DescriptionPaneNumberEditor";
|
||||
import DescriptionPaneSelectEditor from "./DescriptionPaneSelectEditor";
|
||||
import DescriptionPaneTextEditor from "./DescriptionPaneTextEditor";
|
||||
|
||||
interface Props extends DispatchProp {
|
||||
// TODO: We are typing with AnyAction here to work around issues with UnknownAction, the type that was introduced in Redux 5.
|
||||
// If we decide to modernize to Redux 5, we will need to refactor much of the Rules Engine redux usage.
|
||||
interface Props extends DispatchProp<AnyAction> {
|
||||
height: string | null;
|
||||
weight: number | null;
|
||||
size: SizeContract | null;
|
||||
@@ -123,7 +126,7 @@ class DescriptionPane extends React.PureComponent<Props> {
|
||||
}
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<>
|
||||
<DescriptionPaneEntry>
|
||||
<DescriptionPaneSelectEditor
|
||||
label="Alignment"
|
||||
@@ -157,7 +160,7 @@ class DescriptionPane extends React.PureComponent<Props> {
|
||||
{lifestyleDescriptionNode}
|
||||
</DescriptionPaneEntryContent>
|
||||
</DescriptionPaneEntry>
|
||||
</React.Fragment>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -165,7 +168,7 @@ class DescriptionPane extends React.PureComponent<Props> {
|
||||
const { height, weight, skin, eyes, hair, age, gender } = this.props;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<>
|
||||
<DescriptionPaneEntry>
|
||||
<DescriptionPaneTextEditor
|
||||
label="Hair"
|
||||
@@ -227,7 +230,7 @@ class DescriptionPane extends React.PureComponent<Props> {
|
||||
maxLength={128}
|
||||
/>
|
||||
</DescriptionPaneEntry>
|
||||
</React.Fragment>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
import React from "react";
|
||||
import { PureComponent, PropsWithChildren } from "react";
|
||||
|
||||
import { FormatUtils } from "@dndbeyond/character-rules-engine/es";
|
||||
|
||||
interface Props {
|
||||
interface Props extends PropsWithChildren {
|
||||
propertyKey: string;
|
||||
className: string;
|
||||
}
|
||||
export default class DescriptionPaneEditor extends React.PureComponent<Props> {
|
||||
export default class DescriptionPaneEditor extends PureComponent<Props> {
|
||||
render() {
|
||||
const { propertyKey, className } = this.props;
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { PureComponent, PropsWithChildren } from "react";
|
||||
|
||||
export default class DescriptionPaneEditorLabel extends React.PureComponent {
|
||||
export default class DescriptionPaneEditorLabel extends PureComponent<PropsWithChildren> {
|
||||
render() {
|
||||
return (
|
||||
<div className="ct-description-pane__editor-label">
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { PureComponent, PropsWithChildren } from "react";
|
||||
|
||||
export default class DescriptionPaneEditorValue extends React.PureComponent {
|
||||
export default class DescriptionPaneEditorValue extends PureComponent<PropsWithChildren> {
|
||||
render() {
|
||||
return (
|
||||
<div className="ct-description-pane__editor-value">
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { PureComponent, PropsWithChildren } from "react";
|
||||
|
||||
export default class DescriptionPaneEntry extends React.PureComponent {
|
||||
export default class DescriptionPaneEntry extends PureComponent<PropsWithChildren> {
|
||||
render() {
|
||||
return (
|
||||
<div className="ct-description-pane__entry">{this.props.children}</div>
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { PureComponent, PropsWithChildren } from "react";
|
||||
|
||||
export default class DescriptionPaneEntryContent extends React.PureComponent {
|
||||
export default class DescriptionPaneEntryContent extends PureComponent<PropsWithChildren> {
|
||||
render() {
|
||||
return (
|
||||
<div className="ct-description-pane__entry-content">
|
||||
|
||||
+3
-2
@@ -1,11 +1,12 @@
|
||||
import React from "react";
|
||||
|
||||
import { Select } from "@dndbeyond/character-components/es";
|
||||
import {
|
||||
HelperUtils,
|
||||
HtmlSelectOption,
|
||||
} from "@dndbeyond/character-rules-engine/es";
|
||||
|
||||
import { Select } from "~/components/Select";
|
||||
|
||||
import DescriptionPaneEditor from "../DescriptionPaneEditor";
|
||||
import DescriptionPaneEditorLabel from "../DescriptionPaneEditorLabel";
|
||||
import DescriptionPaneEditorValue from "../DescriptionPaneEditorValue";
|
||||
@@ -56,11 +57,11 @@ export default class DescriptionPaneSelectEditor extends React.PureComponent<
|
||||
<DescriptionPaneEditorLabel>{label}</DescriptionPaneEditorLabel>
|
||||
<DescriptionPaneEditorValue>
|
||||
<Select
|
||||
className="ct-description-pane__editor-input"
|
||||
placeholder="--"
|
||||
options={options}
|
||||
value={value}
|
||||
onChange={this.handleChange}
|
||||
name={propertyKey}
|
||||
/>
|
||||
</DescriptionPaneEditorValue>
|
||||
</DescriptionPaneEditor>
|
||||
|
||||
Reference in New Issue
Block a user