Skip to content

Commit

Permalink
began settings edit modal
Browse files Browse the repository at this point in the history
can now add block types
  • Loading branch information
valentine195 committed Dec 3, 2021
1 parent a924087 commit 7904444
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/data/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ interface CommonProps {
properties: Array<keyof Monster>;
conditioned?: boolean;
fallback?: string;
display?: string;
hasRule?: boolean;
dice?: {
default?: keyof Monster;
Expand All @@ -48,8 +47,6 @@ type GroupProps = {
};
type HeadingProps = {
type: "heading";
saveIcon?: boolean;
downloadIcon?: boolean;
};
type InlineProps = {
type: "inline";
Expand All @@ -58,9 +55,11 @@ type InlineProps = {
type PropertyProps = {
type: "property";
callback?: (monster: Monster) => string;
display?: string;
};
type SavesProps = {
type: "saves";
display?: string;
};
type SectionProps = {
type: "section";
Expand All @@ -74,7 +73,6 @@ type SubHeadingProps = {
};
type TableProps = {
type: "table";
dice: boolean;
headers: string[];
};

Expand All @@ -98,6 +96,18 @@ export type StatblockItem =
| SubHeadingItem
| TableItem;

export interface StatblockRecord {
section: SectionItem;
heading: HeadingItem;
subheading: SubHeadingItem;
property: PropertyItem;
table: TableItem;
saves: SavesItem;
spells: SpellsItem;
inline: InlineItem;
group: GroupItem;
}

export interface Layout {
name: string;
blocks: StatblockItem[];
Expand All @@ -113,8 +123,6 @@ export const Statblock5e: StatblockItem[] = [
type: "heading",
id: nanoid(),
properties: ["name"],
saveIcon: true,
downloadIcon: true,
conditioned: true
},
{
Expand Down Expand Up @@ -171,8 +179,7 @@ export const Statblock5e: StatblockItem[] = [
properties: ["stats"],
headers: ["Str", "Dex", "Con", "Wis", "Int", "Cha"],
hasRule: true,
conditioned: true,
dice: true
conditioned: true
},

{
Expand Down

0 comments on commit 7904444

Please sign in to comment.