Skip to content

Commit f06c73c

Browse files
committed
refactor: simplify print button with custom styling
1 parent c149edd commit f06c73c

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

src/renderer/src/print.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import React, { useEffect, useMemo } from 'react'
66
import ReactDOM from 'react-dom/client'
77
import handlebars from 'handlebars'
88
import surgeryOpNoteTemplate from '../../../resources/templates/surgery-opnote.hbs?raw'
9-
import { Button } from './components/ui/button'
109

1110
const printTemplate = handlebars.compile(surgeryOpNoteTemplate)
1211

@@ -47,8 +46,10 @@ const Print = () => {
4746

4847
return (
4948
<div className="w-full">
50-
<div className="flex justify-end print-hidden">
51-
<Button onClick={handlePrint}>Print</Button>
49+
<div className="flex justify-end print-hidden p-1" id="print-area">
50+
<button className="print-btn" onClick={handlePrint}>
51+
Print
52+
</button>
5253
</div>
5354
{printData && <div dangerouslySetInnerHTML={{ __html: printHtml }}></div>}
5455
</div>

src/renderer/src/styles/screen.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,3 +284,16 @@ body {
284284
.prose em {
285285
font-style: italic;
286286
}
287+
288+
.print-btn {
289+
padding: 8px 16px;
290+
background-color: #3996f9;
291+
color: #fff;
292+
border: none;
293+
border-radius: 4px;
294+
cursor: pointer;
295+
}
296+
297+
.print-btn:hover {
298+
background-color: #2f7ed8;
299+
}

0 commit comments

Comments
 (0)