Skip to content

Commit

Permalink
fix linter errors + add index file to packages/extras folder
Browse files Browse the repository at this point in the history
  • Loading branch information
paola-p committed Dec 4, 2023
1 parent c73f77c commit efeeb27
Show file tree
Hide file tree
Showing 4 changed files with 393 additions and 443 deletions.
14 changes: 9 additions & 5 deletions packages/components/src/layout/TotalLayout/TotalLayoutFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,21 @@ const TotalLayoutFooter = ({
);

const renderFinalActions = () => {
if (activeStep < totalSteps - 1) {
// It's not the final step
if (activeStep < totalSteps - 1)
return <Button onClick={onNext}>{footerActionsLabels.next}</Button>;
} else if (finalActions?.length > 1) {

// It's the final step and there's more than one final action
if (finalActions?.length > 1) {
return (
<DropdownButton data={finalActions}>
{footerActionsLabels.dropdownLabel || 'Finalizar'}
</DropdownButton>
);
} else {
return <Button onClick={finalActions[0].onClick}>{finalActions[0].label}</Button>;
}

// It's the final step and there's only one final action
return <Button onClick={finalActions[0].onClick}>{finalActions[0].label}</Button>;
};

return (
Expand All @@ -52,7 +56,7 @@ const TotalLayoutFooter = ({
<div></div>
<Stack direction="row" spacing={2} noFlex>
{/* SAVE? */}
{!isNaN(stepNumberForDraftSave) && activeStep >= stepNumberForDraftSave && (
{!Number.isNaN(stepNumberForDraftSave) && activeStep >= stepNumberForDraftSave && (
<Button variant="link" onClick={onSave}>
{footerActionsLabels.save}
</Button>
Expand Down
41 changes: 7 additions & 34 deletions packages/components/src/tokens.compiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ export default {
"y": 0,
"blur": 4,
"spread": 0,
"color": "#ffffff",
"color": "#ffffff26",
"type": "dropShadow"
},
"type": "boxShadow"
Expand Down Expand Up @@ -1234,17 +1234,8 @@ export default {
"type": "color"
},
"hover--reverse-transparent": {
"value": "#ffffff",
"type": "color",
"$extensions": {
"studio.tokens": {
"modify": {
"type": "alpha",
"value": "0.15",
"space": "lch"
}
}
}
"value": "#ffffff26",
"type": "color"
},
"down": {
"value": "#F1FFBD",
Expand Down Expand Up @@ -4939,30 +4930,12 @@ export default {
"color": {
"primary": {
"default": {
"value": "#4D5358",
"type": "color",
"$extensions": {
"studio.tokens": {
"modify": {
"type": "alpha",
"value": "0.4",
"space": "lch"
}
}
}
"value": "#4d535866",
"type": "color"
},
"hover": {
"value": "#4D5358",
"type": "color",
"$extensions": {
"studio.tokens": {
"modify": {
"type": "alpha",
"value": "0.7",
"space": "lch"
}
}
}
"value": "#4d5358b3",
"type": "color"
},
"down": {
"value": "#4D5358",
Expand Down
3 changes: 3 additions & 0 deletions packages/extras/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './form';
export * from './informative';
export * from './navigation';
Loading

0 comments on commit efeeb27

Please sign in to comment.