fix(custom buttons): move order prop to parent div

This commit is contained in:
Timothy Stewart 2021-11-24 13:13:25 -06:00
parent 518fa85aac
commit f60914d5e4

View File

@ -65,7 +65,7 @@ function Home(props) {
return texts.map((t, i) => { return texts.map((t, i) => {
// do not try to render button unless it has all of the required props // do not try to render button unless it has all of the required props
return ( return (
<React.Fragment key={i}> <div key={i} order={buttonOrder(names[i]?.trim())}>
{names && {names &&
names[i] && names[i] &&
urls && urls &&
@ -86,11 +86,10 @@ function Home(props) {
backgroundColor: buttonColors[i]?.trim(), backgroundColor: buttonColors[i]?.trim(),
color: textColors[i].trim(), color: textColors[i].trim(),
}} }}
order={buttonOrder(names[i]?.trim())}
alt={altTexts[i]?.trim()} alt={altTexts[i]?.trim()}
/> />
)} )}
</React.Fragment> </div>
); );
}); });
}; };