Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes a contribution #3

Merged
merged 3 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/pr-annotations.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI

Check failure on line 1 in .github/workflows/pr-annotations.yaml

View check run for this annotation

Trunk.io / Trunk Check

prettier

Incorrect formatting, autoformat by running 'trunk fmt'

Check failure on line 1 in .github/workflows/pr-annotations.yaml

View workflow job for this annotation

GitHub Actions / Trunk Check

prettier

Incorrect formatting, autoformat by running 'trunk fmt'

on:
push:
Expand All @@ -17,7 +17,10 @@

jobs:
Lint:
name: Trunk Check Annotate
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ pnpm-debug.log*

# macOS-specific files
.DS_Store

package-lock.json
9 changes: 5 additions & 4 deletions src/components/RedSquareWithResize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
const canvasRef = useRef<HTMLCanvasElement>(null);
const [x, setX] = useState(0);
const [y, setY] = useState(0);
const [w, setW] = useState(50);
const [h, setH] = useState(50);
const [w, setW] = useState(50);
const [h, setH] = useState(50);

const draw = (ctx: {
fillStyle: string;
Expand All @@ -29,6 +29,7 @@
return (
<div>
<canvas ref={canvasRef} height={200} width={200} />
<p>The box is positioned at {{x}}, {{y}} with size {{w}} by {{h}}.<p/>

Check failure on line 32 in src/components/RedSquareWithResize.tsx

View check run for this annotation

Trunk.io / Trunk Check

prettier(SyntaxError)

[new] JSX element 'p' has no corresponding closing tag.

Check failure on line 32 in src/components/RedSquareWithResize.tsx

View workflow job for this annotation

GitHub Actions / Trunk Check

prettier(SyntaxError)

[new] JSX element 'p' has no corresponding closing tag.
<div
style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: "10px" }}
>
Expand All @@ -38,7 +39,7 @@
max={100}
step={1}
value={x}
label="X"
label='X-Position'
handleChange={(event) => {
setX(parseInt(event.target.value));
}}
Expand All @@ -50,7 +51,7 @@
max={100}
step={1}
value={y}
label="Y"
label='Y-Position'
handleChange={(event) => {
setY(parseInt(event.target.value));
}}
Expand Down
3 changes: 2 additions & 1 deletion src/content/docs/4-advanced-drawing-and-events/clipping.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: placeholder
description: placeholder
prev: true
prev: true

---
Loading