🐛 inline CSS for PixelPerfectCanvas

main
Shad Amethyst 2 years ago
parent 04deb14753
commit fef0f2587f

@ -1,6 +1,6 @@
{
"name": "@shadryx/pptk",
"version": "0.1.1",
"version": "0.1.2",
"description": "Pixel-Perfect ToolKit, a library to help make pixel-perfect applications on high-DPI devices",
"keywords": [
"pixel-perfect",

@ -1,3 +0,0 @@
.container {
overflow: hidden;
}

@ -1,6 +1,5 @@
import { JSX, Component, createEffect, onCleanup } from "solid-js";
import { attachCanvas, AttachCanvasOptions } from '../index.js';
import styles from './PixelPerfectCanvas.module.css';
export type PixelPerfectCanvasProps = {
/**
@ -59,8 +58,11 @@ export const PixelPerfectCanvas: Component<PixelPerfectCanvasProps> = (props) =>
});
return (<div
style={props.style}
class={[props.class, styles.container].filter(Boolean).join(' ')}
style={{
...props.style,
overflow: 'hidden'
}}
class={props.class}
ref={(div) => containerRef = div}
>
<canvas ref={(canvas) => canvasRef = canvas}>

Loading…
Cancel
Save