Skip to content

Commit 3e0a87b

Browse files
committed
Final tweaks
1 parent 449bfa3 commit 3e0a87b

8 files changed

+8
-33
lines changed

docs/components/PropTable.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ function PropType({ prop }: { prop: DocgenProp }) {
149149
return (
150150
<div className="flex flex-col gap-1">
151151
{prop.description && (
152-
<p className="text-gray-800 dark:text-slate-200 markdown">
152+
<div className="text-gray-800 dark:text-slate-200 markdown">
153153
<ReactMarkdown>{prop.description}</ReactMarkdown>
154-
</p>
154+
</div>
155155
)}
156156
<div className="text-gray-600 dark:text-slate-400">{typeNode}</div>
157157
</div>

docs/components/guide-examples/display/images/ImageExample.tsx

+5-30
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,25 @@
11
"use client"
22

33
import {
4-
Coordinates,
5-
Image,
64
Mafs,
5+
Image,
6+
Coordinates,
77
useMovablePoint,
88
} from "mafs"
99

1010
import image from "./mafs.png"
1111

1212
export default function ImageExample() {
13-
const origin = useMovablePoint([3, 3])
14-
const padding = 0.1
13+
const origin = useMovablePoint([1, 1])
1514

1615
return (
1716
<Mafs viewBox={{ x: [-1, 7], y: [-1, 5] }}>
1817
<Coordinates.Cartesian />
19-
<Image
20-
href={image.src ?? image}
21-
anchor="tl"
22-
x={origin.x + padding}
23-
y={origin.y - padding}
24-
width={2}
25-
height={2}
26-
/>
27-
<Image
28-
href={image.src ?? image}
29-
anchor="tr"
30-
x={origin.x - padding}
31-
y={origin.y - padding}
32-
width={2}
33-
height={2}
34-
/>
3518
<Image
3619
href={image.src ?? image}
3720
anchor="bl"
38-
x={origin.x + padding}
39-
y={origin.y + padding}
40-
width={2}
41-
height={2}
42-
/>
43-
<Image
44-
href={image.src ?? image}
45-
anchor="br"
46-
x={origin.x - padding}
47-
y={origin.y + padding}
21+
x={origin.x}
22+
y={origin.y}
4823
width={2}
4924
height={2}
5025
/>

src/display/Image.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface ImageProps {
1919
* This is passed directly to the `preserveAspectRatio` attribute of the SVG
2020
* `<image>` element.
2121
*
22-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio
22+
* See [preserveAspectRatio](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio) on MDN.
2323
*/
2424
preserveAspectRatio?: string
2525

0 commit comments

Comments
 (0)