@@ -9,7 +9,8 @@ import CustomImage from "../CustomImage/CustomImage"
99
1010const Banner = ( { data } ) => {
1111 const { theme } = useTheme ( )
12- const { title, variant, summary, animation, image, imageDark, button } = data
12+ const { title, variant, summary, animation, image, imageDark, arrayButtons, button } = data
13+
1314
1415 const defaultOptions = {
1516 loop : true ,
@@ -39,14 +40,27 @@ const Banner = ({ data }) => {
3940 dangerouslySetInnerHTML = { { __html : summary } }
4041 />
4142 }
42- { button && (
43- < CustomLink
44- content = { button ?. content }
45- url = { button ?. url }
46- landing = { button ?. english_landing_page }
47- className = { "button" }
48- />
43+ { Array . isArray ( arrayButtons ) && arrayButtons . length > 0 && (
44+ < div className = "banner__buttons" >
45+ { arrayButtons . map ( ( btn , index ) => (
46+ < CustomLink
47+ key = { index }
48+ content = { btn . content }
49+ url = { btn . url }
50+ landing = { btn . english_landing_page }
51+ className = "button"
52+ />
53+ ) ) }
54+ </ div >
4955 ) }
56+ { button && (
57+ < CustomLink
58+ content = { button . content }
59+ url = { button ?. url }
60+ landing = { button ?. landing_page }
61+ className = { 'button' }
62+ />
63+ ) }
5064 </ div >
5165 </ div >
5266
@@ -81,6 +95,15 @@ Banner.propTypes = {
8195 title : PropTypes . string . isRequired ,
8296 variant : PropTypes . string . isRequired ,
8397 summary : PropTypes . string ,
98+ arrayButtons : PropTypes . arrayOf (
99+ PropTypes . shape ( {
100+ content : PropTypes . string ,
101+ url : PropTypes . string ,
102+ english_landing_page : PropTypes . shape ( {
103+ slug : PropTypes . string . isRequired ,
104+ } ) ,
105+ } )
106+ ) ,
84107 button : PropTypes . shape ( {
85108 content : PropTypes . string . isRequired ,
86109 url : PropTypes . string ,
0 commit comments