Skip to content

Commit

Permalink
more padding options (#1575)
Browse files Browse the repository at this point in the history
* more padding options

* remove migration

* holy cow

* add config maxes
  • Loading branch information
TomWoodward authored Jul 26, 2024
1 parent ab97c60 commit d3b6e79
Show file tree
Hide file tree
Showing 4 changed files with 1,992 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pages/custom_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ class LinksGroupBlock(blocks.StructBlock):
('blue', 'Blue'),
('deep-green', 'Deep Green'),
], default='descending')),
('analytics_label', blocks.CharBlock(required=False)),
], block_counts={
'color': {'max_num': 1},
'analytics_label': {'max_num': 1},
}, required=False)

class Meta:
Expand All @@ -110,12 +112,9 @@ class CTAButtonBarBlock(blocks.StructBlock):
default=[], max_num=2, label='Actions'
)
config = blocks.StreamBlock([
('priority', blocks.ChoiceBlock(choices=[
('descending', 'Descending'),
('equal', 'Equal'),
], default='descending')),
('analytics_label', blocks.CharBlock(required=False)),
], block_counts={
'priority': {'max_num': 1},
'analytics_label': {'max_num': 1},
}, required=False)

class Meta:
Expand Down
Loading

0 comments on commit d3b6e79

Please sign in to comment.