-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add BuyModal and BuyModalOptions documents (#27)
* feat: add BuyModal and BuyModalOptions documents * fix: comment create action
- Loading branch information
Showing
7 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export default { | ||
type: 'document', | ||
name: 'buyModal', | ||
title: 'Buy Modal', | ||
__experimental_actions: ['update', /* 'create', 'delete', */ 'publish'], | ||
fields: [ | ||
{ | ||
title: 'Info card', | ||
name: 'infoCard', | ||
type: 'infoCard', | ||
description: 'Create the card to be displayed at the top of the buy modal', | ||
validation: Rule => Rule.required(), | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export default { | ||
type: 'document', | ||
name: 'buyModalOptions', | ||
title: 'Buy Modal Options', | ||
__experimental_actions: ['update', /* 'create', 'delete', */ 'publish'], | ||
fields: [ | ||
{ | ||
title: 'Title', | ||
name: 'title', | ||
type: 'string', | ||
validation: Rule => Rule.required(), | ||
}, | ||
{ | ||
title: 'Buy Options Cards', | ||
name: 'cards', | ||
type: 'array', | ||
description: | ||
'Create one or several cards (min 1), to be displayed when clicking a buy button for a non-connected user', | ||
of: [ | ||
{ | ||
type: 'actionCard', | ||
}, | ||
], | ||
validation: Rule => Rule.required().min(1), | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
export default { | ||
name: 'actionCard', | ||
type: 'object', | ||
title: 'ActionCard', | ||
fields: [ | ||
{ | ||
title: 'Title', | ||
name: 'title', | ||
type: 'string', | ||
validation: Rule => Rule.required(), | ||
}, | ||
{ | ||
title: 'Description', | ||
name: 'description', | ||
type: 'customPortableText', | ||
validation: Rule => Rule.required(), | ||
}, | ||
{ | ||
title: 'Button', | ||
name: 'button', | ||
type: 'button', | ||
validation: Rule => Rule.required(), | ||
}, | ||
{ | ||
title: 'Note', | ||
name: 'note', | ||
type: 'customPortableText', | ||
}, | ||
{ | ||
title: 'Image', | ||
name: 'image', | ||
type: 'customImage', | ||
validation: Rule => Rule.required(), | ||
}, | ||
], | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export default { | ||
name: 'infoCard', | ||
type: 'object', | ||
title: 'InfoCard', | ||
fields: [ | ||
{ | ||
title: 'Title', | ||
name: 'title', | ||
type: 'string', | ||
validation: Rule => Rule.required(), | ||
}, | ||
{ | ||
title: 'Description', | ||
name: 'description', | ||
type: 'customPortableText', | ||
validation: Rule => Rule.required(), | ||
}, | ||
{ | ||
title: 'Image', | ||
name: 'image', | ||
type: 'customImage', | ||
validation: Rule => Rule.required(), | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters