Skip to content

Commit

Permalink
added a separate scss file for cssButtonReset
Browse files Browse the repository at this point in the history
  • Loading branch information
Ps committed Jan 15, 2024
1 parent c760701 commit 704d6cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next';
import { Button } from '@carbon/react';
import { showModal, toOmrsIsoString } from '@openmrs/esm-framework';
import placeholder from '../assets/placeholder.svg';
import styles from './capture-photo.scss';

export interface CapturePhotoProps {
onCapturePhoto(dataUri: string, photoDateTime: string): void;
Expand Down Expand Up @@ -30,11 +31,7 @@ const CapturePhoto: React.FC<CapturePhotoProps> = ({ initialState, onCapturePhot

return (
<div style={{ display: 'flex', alignItems: 'center' }}>
<button
type="button"
onClick={showCam}
style={{ border: 'none', maxWidth: '64px', padding: 0, margin: 0, background: 'none', cursor: 'pointer' }}
>
<button type="button" onClick={showCam} className={styles.buttonCssReset}>
<img src={dataUri || initialState || placeholder} alt="Preview" style={{ width: '100%' }} />
</button>
<Button kind="ghost" onClick={showCam} style={{ flex: 1 }}>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.buttonCssReset {
max-width: 64px;
padding: 0;
margin: 0;
border: none;
background: none;
cursor: pointer;
}

0 comments on commit 704d6cf

Please sign in to comment.