Grabbed dndbeyond's source code
``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
This commit is contained in:
+45
@@ -0,0 +1,45 @@
|
||||
import React from "react";
|
||||
|
||||
import { CharacterTheme } from "@dndbeyond/character-rules-engine/es";
|
||||
|
||||
import { GD_VehicleBlockActionSummariesProps } from "../../../utils/Component";
|
||||
import VehicleBlockActionSummary from "../VehicleBlockActionSummary";
|
||||
import VehicleBlockSectionHeader from "../VehicleBlockSectionHeader";
|
||||
|
||||
interface Props extends GD_VehicleBlockActionSummariesProps {
|
||||
theme: CharacterTheme;
|
||||
}
|
||||
export default class VehicleBlockActionSummaries extends React.PureComponent<Props> {
|
||||
render() {
|
||||
const { actionsText, actionsSummaries, theme } = this.props;
|
||||
|
||||
if (actionsText === null && actionsSummaries.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="ct-vehicle-block__action-summaries">
|
||||
<VehicleBlockSectionHeader label="Actions" />
|
||||
{actionsText !== null && (
|
||||
<div className="ct-vehicle-block__action-summaries-content">
|
||||
{actionsText}
|
||||
</div>
|
||||
)}
|
||||
{actionsSummaries.length > 0 && (
|
||||
<div className="ct-vehicle-block__action-summaries-content">
|
||||
{actionsSummaries.map((summary, idx) => {
|
||||
const key = `${summary.name !== null ? summary.name : ""}-${idx}`;
|
||||
return (
|
||||
<VehicleBlockActionSummary
|
||||
theme={theme}
|
||||
actionSummary={summary}
|
||||
key={key}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import VehicleBlockActionSummaries from "./VehicleBlockActionSummaries";
|
||||
|
||||
export default VehicleBlockActionSummaries;
|
||||
export { VehicleBlockActionSummaries };
|
||||
Reference in New Issue
Block a user