Skip to content

Commit

Permalink
fix: center the question submit button's checkmark
Browse files Browse the repository at this point in the history
CSS lets us stack backgrounds on top of one another, so let's do that
instead of making it an inline image.
  • Loading branch information
adroitwhiz committed Mar 7, 2024
1 parent 753b5b5 commit 1682cdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
13 changes: 4 additions & 9 deletions src/components/question/question.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
border-radius: 100%;

color: white;
background: $looks-secondary;
background: url('./icon--enter.svg'), $looks-secondary;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}

[dir="ltr"] .question-submit-button {
Expand Down Expand Up @@ -62,11 +65,3 @@
.question-input > input:focus {
box-shadow: 0px 0px 0px 3px $looks-transparent;
}

.question-submit-button-icon {
width: calc(2rem - $space);
height: calc(2rem - $space);
position: relative;
right: -7px;
left: -7px;
}
9 changes: 1 addition & 8 deletions src/components/question/question.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import PropTypes from 'prop-types';
import React from 'react';
import styles from './question.css';
import Input from '../forms/input.jsx';
import enterIcon from './icon--enter.svg';

const QuestionComponent = props => {
const {
Expand All @@ -29,13 +28,7 @@ const QuestionComponent = props => {
<button
className={styles.questionSubmitButton}
onClick={onClick}
>
<img
className={styles.questionSubmitButtonIcon}
draggable={false}
src={enterIcon}
/>
</button>
/>
</div>
</div>
</div>
Expand Down

0 comments on commit 1682cdd

Please sign in to comment.