feat: implement swiss qrcode component
parent
b18199912c
commit
60638bcbdf
@ -0,0 +1,26 @@
|
|||||||
|
import { Component, splitProps } from "solid-js";
|
||||||
|
import QrCode from "./QrCode";
|
||||||
|
|
||||||
|
const SwissQrCode: Component<Parameters<typeof QrCode>[0]> = (p) => {
|
||||||
|
const [props, rest] = splitProps(p, ["class"]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div class={"relative " + props.class}>
|
||||||
|
<div class="absolute flex w-full h-full justify-center items-center">
|
||||||
|
<img
|
||||||
|
alt="Flag of Switzerland"
|
||||||
|
src="swiss-cross/CH-Kreuz_Freiheit_7mm.svg"
|
||||||
|
class="w-[15%] h-[15%]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<QrCode
|
||||||
|
class="w-full h-full"
|
||||||
|
margin={0}
|
||||||
|
errorCorrectionLevel="M"
|
||||||
|
{...rest}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SwissQrCode;
|
Loading…
Reference in New Issue