Skip to content

Commit

Permalink
fix: little refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Cayla Hamann committed Jun 11, 2020
1 parent 702dc98 commit 6056e69
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
38 changes: 19 additions & 19 deletions src/components/ConstantReference.module.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
.container {
color: var(--color-neutrals-500);
font-family: var(--code-font);
font-size: 0.875rem;
line-height: 1.5;
margin-top: 2rem;
}
color: var(--color-neutrals-500);
font-family: var(--code-font);
font-size: 0.875rem;
line-height: 1.5;
margin-top: 2rem;
}

.name {
font-size: 1rem;
font-family: var(--primary-font-family);
color: var(--color-neutrals-800);
margin-bottom: 0.5rem;
}
.name {
font-size: 1rem;
font-family: var(--primary-font-family);
color: var(--color-neutrals-800);
margin-bottom: 0.5rem;
}

.block {
margin-left: 0.5rem;
}
.constantContainer {
margin: 0 0 1rem 1.5rem;
}
.block {
margin-left: 0.5rem;
}

.constantContainer {
margin: 0 0 1rem 1.5rem;
}
11 changes: 6 additions & 5 deletions src/hooks/useApiDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ const useApiDoc = (name) => {
return {
name: `${name}.${member}`,
type: api[member] instanceof Array ? 'array' : typeof api[member],
values: !(api[member] instanceof Array)
? Object.getOwnPropertyNames(api[member]).map(
(key) => `${key}:${JSON.stringify(api[member][key])}`
)
: api[member].map((el) => JSON.stringify(el)),
values:
api[member] instanceof Array
? api[member].map((el) => JSON.stringify(el))
: Object.getOwnPropertyNames(api[member]).map(
(key) => `${key}: ${JSON.stringify(api[member][key])}`
),
};
});
};
Expand Down

0 comments on commit 6056e69

Please sign in to comment.