Skip to content

Commit

Permalink
[DEV-1432]: Add heroSlider to the homepage schema, CallToAction compo…
Browse files Browse the repository at this point in the history
…nent and HeroSlide component to Strapi (#671)

* feat(DEV-1432): add hero schema on strapi

* chore: update changeset

Co-authored-by: marcobottaro <[email protected]>

* chore: update changeset message

* feat(DEV-1432): update strapi schema

* revert package-lock.json

---------

Co-authored-by: marcobottaro <[email protected]>
Co-authored-by: Michele Da Rin Fioretto <[email protected]>
  • Loading branch information
3 people authored Feb 29, 2024
1 parent 9217615 commit e435919
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/thick-trainers-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"strapi-cms": minor
---

Add heroSlider to the homepage schema, CallToAction component and HeroSlide component to Strapi
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@
"localized": true
}
}
},
"heroSlider": {
"type": "component",
"repeatable": true,
"pluginOptions": {
"i18n": {
"localized": true
}
},
"component": "common.hero-slide"
}
}
}
24 changes: 24 additions & 0 deletions apps/strapi-cms/src/components/common/call-to-action.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"collectionName": "components_common_call_to_actions",
"info": {
"displayName": "CallToAction",
"description": ""
},
"options": {},
"attributes": {
"variant": {
"type": "enumeration",
"enum": [
"text",
"contained",
"outlined"
]
},
"link": {
"type": "component",
"repeatable": false,
"component": "common.links",
"required": true
}
}
}
35 changes: 35 additions & 0 deletions apps/strapi-cms/src/components/common/hero-slide.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"collectionName": "components_common_hero_slides",
"info": {
"displayName": "HeroSlide",
"description": ""
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"titleColor": {
"type": "enumeration",
"enum": [
"contrastText",
"main",
"light",
"dark"
]
},
"backgroundImage": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images"
]
},
"callToAction": {
"type": "component",
"repeatable": false,
"component": "common.call-to-action"
}
}
}

0 comments on commit e435919

Please sign in to comment.