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,47 @@
|
||||
import React from "react";
|
||||
|
||||
import { ThemeButton } from "../common/Button";
|
||||
|
||||
interface Props {
|
||||
onPactChoose: () => void;
|
||||
onSpellChoose: () => void;
|
||||
isSpellSlotAvailable: boolean;
|
||||
isPactSlotAvailable: boolean;
|
||||
doesSpellSlotExist: boolean;
|
||||
doesPactSlotExist: boolean;
|
||||
}
|
||||
export default class SpellSlotChooser extends React.PureComponent<Props> {
|
||||
render() {
|
||||
const {
|
||||
onPactChoose,
|
||||
onSpellChoose,
|
||||
doesSpellSlotExist,
|
||||
doesPactSlotExist,
|
||||
isSpellSlotAvailable,
|
||||
isPactSlotAvailable,
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<div className="ct-spells-slot-chooser">
|
||||
{doesSpellSlotExist && (
|
||||
<ThemeButton
|
||||
onClick={onSpellChoose}
|
||||
size={"small"}
|
||||
disabled={!isSpellSlotAvailable}
|
||||
>
|
||||
Spell Slot
|
||||
</ThemeButton>
|
||||
)}
|
||||
{doesPactSlotExist && (
|
||||
<ThemeButton
|
||||
onClick={onPactChoose}
|
||||
size={"small"}
|
||||
disabled={!isPactSlotAvailable}
|
||||
>
|
||||
Pact Slot
|
||||
</ThemeButton>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user