fix: in print preview show same page margin independent of fullWidthInvoice

master
Katja Lutz 2 years ago
parent d04ad556d1
commit 39a72b6670

@ -92,7 +92,9 @@ export default function Home() {
}); });
const InnerPadding: FlowComponent = (props) => ( const InnerPadding: FlowComponent = (props) => (
<div classList={{ "px-16": state.fullWidthInvoice }}>{props.children}</div> <div classList={{ "mx-16 print:mx-[11mm]": state.fullWidthInvoice }}>
{props.children}
</div>
); );
const PageHeader: Component = () => { const PageHeader: Component = () => {
@ -278,9 +280,9 @@ export default function Home() {
<Style type="text/css">{` <Style type="text/css">{`
@page { @page {
size: A4 portrait; size: A4 portrait;
margin: 11mm ${state.fullWidthInvoice ? 0 : 4}rem 11mm ${ margin: 11mm ${state.fullWidthInvoice ? 0 : 11}mm 11mm ${
state.fullWidthInvoice ? 0 : 4 state.fullWidthInvoice ? 0 : 11
}rem; }mm;
} }
.swissinvoice { .swissinvoice {

Loading…
Cancel
Save