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>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user