Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

question additions #26

Merged
merged 2 commits into from
May 23, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix caret rotation
  • Loading branch information
atomiks committed May 23, 2018
commit 9763f383a9dabcff4547cbc99593b6d8bdb50b0c
4 changes: 4 additions & 0 deletions website/css/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ code {
vertical-align: -5px;
margin-left: 8px;
}

.is-rotated svg {
transform: rotate(180deg);
}
}

@media (min-width: $breakpoint-md) {
Expand Down
3 changes: 2 additions & 1 deletion website/js/components/Question.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ export default ({ name, question, answer, goodToHear, isOpen, expertise }) => (
>
{isOpen ? "Hide" : "Show"} answer
<i
class={cc({ "is-rotated": isOpen })}
innerHTML={feather.icons["chevron-down"].toSvg({
class: cc("btn__icon", { "is-rotated": isOpen })
class: "btn__icon"
})}
/>
</button>
Expand Down
2 changes: 1 addition & 1 deletion website/js/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const cc = (constant, conditionalClasses) => {
export const cc = (constant, conditionalClasses = constant) => {
const res = Object.keys(conditionalClasses).reduce(
(acc, className) =>
acc + (conditionalClasses[className] ? " " + className : ""),
Expand Down