Skip to content

Commit

Permalink
Re-use bg-color for image upload (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel-Therrien-Beslogic authored Oct 3, 2024
1 parent be6064c commit efb6f54
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 11 additions & 0 deletions canopeum_frontend/src/components/analytics/ImageUpload.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@import '../../App.scss';

.upload-button {
background-color: var(--bs-body-bg);
}

.upload-instruction {
background-color: var(--bs-body-bg);
border-radius: $border-radius;
padding: 0 0.5rem;
}
6 changes: 4 additions & 2 deletions canopeum_frontend/src/components/analytics/ImageUpload.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions -- custom input label */
import './ImageUpload.scss'

import type { ChangeEvent, DragEvent } from 'react'
import { useTranslation } from 'react-i18next'

Expand Down Expand Up @@ -51,8 +53,8 @@ const ImageUpload = ({ id, onChange, imageUrl }: Props) => {
}}
>
<img alt='' src={UploadIcon} />
<div className='btn btn-outline-primary'>{t('generic.upload')}</div>
<div>{t('analytics.image-upload')}</div>
<div className='btn btn-outline-primary upload-button'>{t('generic.upload')}</div>
<div className='upload-instruction'>{t('analytics.image-upload')}</div>
</label>
<input
accept={supportedFileTypes.join(',')}
Expand Down

0 comments on commit efb6f54

Please sign in to comment.