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:
@@ -0,0 +1,24 @@
|
||||
import React from "react";
|
||||
|
||||
import { FormatUtils } from "@dndbeyond/character-rules-engine/es";
|
||||
|
||||
interface Props {
|
||||
name: string;
|
||||
className: string;
|
||||
}
|
||||
export default class Subsection extends React.PureComponent<Props> {
|
||||
static defaultProps = {
|
||||
className: "",
|
||||
};
|
||||
|
||||
render() {
|
||||
const { name, children, className } = this.props;
|
||||
|
||||
let classNames: Array<string> = [className, "ct-subsection"];
|
||||
if (name) {
|
||||
classNames.push(`ct-subsection--${FormatUtils.slugify(name)}`);
|
||||
}
|
||||
|
||||
return <div className={classNames.join(" ")}>{children}</div>;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import React from "react";
|
||||
|
||||
export default class SubsectionFooter extends React.PureComponent {
|
||||
render() {
|
||||
const { children } = this.props;
|
||||
|
||||
return <div className="ct-subsection__footer">{children}</div>;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import SubsectionFooter from "./SubsectionFooter";
|
||||
|
||||
export default SubsectionFooter;
|
||||
export { SubsectionFooter };
|
||||
@@ -0,0 +1,9 @@
|
||||
import React from "react";
|
||||
|
||||
export default class SubsectionHeader extends React.PureComponent {
|
||||
render() {
|
||||
const { children } = this.props;
|
||||
|
||||
return <div className="ct-subsection__header">{children}</div>;
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import React from "react";
|
||||
|
||||
export default class SubsectionHeaderContent extends React.PureComponent {
|
||||
render() {
|
||||
const { children } = this.props;
|
||||
|
||||
return <div className="ct-subsection__header-content">{children}</div>;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import SubsectionHeaderContent from "./SubsectionHeaderContent";
|
||||
|
||||
export default SubsectionHeaderContent;
|
||||
export { SubsectionHeaderContent };
|
||||
@@ -0,0 +1,12 @@
|
||||
import Subsection from "./Subsection";
|
||||
import SubsectionFooter from "./SubsectionFooter";
|
||||
import SubsectionHeader from "./SubsectionHeader";
|
||||
import SubsectionHeaderContent from "./SubsectionHeaderContent";
|
||||
|
||||
export default Subsection;
|
||||
export {
|
||||
Subsection,
|
||||
SubsectionFooter,
|
||||
SubsectionHeader,
|
||||
SubsectionHeaderContent,
|
||||
};
|
||||
Reference in New Issue
Block a user