Skip to content

Commit

Permalink
fix: #310 시간표 인쇄 시 스타일 개선
Browse files Browse the repository at this point in the history
- 테이블 셀에 테두리 누락된 것 추가
  • Loading branch information
smaker committed Oct 12, 2023
1 parent 102faeb commit 2fdf309
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions frontend/src/pages/courses/tab/TimeTableTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ import 'react-tooltip/dist/react-tooltip.css'
type Props = { courseList: any[] };
type PrintButtonProps = { onClick: () => void };

const pageStyle = `
@media print {
@page {
size: auto;
margin: 0mm;
}
body {
-webkit-print-color-adjust: exact;
}
th,
td {
border: 1px solid rgb(230, 230, 230);
}
}
`

const PrintButton = ({ onClick }: PrintButtonProps ) => {
return (
<>
Expand Down Expand Up @@ -111,6 +128,7 @@ const Timetable = (props: Props) => {
const timetableRef = useRef(null);
const handlePrint = useReactToPrint({
content: () => timetableRef.current,
pageStyle: pageStyle,
});
return (
<div className={style.section}>
Expand Down

0 comments on commit 2fdf309

Please sign in to comment.