Skip to content

Commit

Permalink
Final tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenpetryk committed Oct 20, 2024
1 parent 449bfa3 commit 3e0a87b
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 33 deletions.
4 changes: 2 additions & 2 deletions docs/components/PropTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ function PropType({ prop }: { prop: DocgenProp }) {
return (
<div className="flex flex-col gap-1">
{prop.description && (
<p className="text-gray-800 dark:text-slate-200 markdown">
<div className="text-gray-800 dark:text-slate-200 markdown">
<ReactMarkdown>{prop.description}</ReactMarkdown>
</p>
</div>
)}
<div className="text-gray-600 dark:text-slate-400">{typeNode}</div>
</div>
Expand Down
35 changes: 5 additions & 30 deletions docs/components/guide-examples/display/images/ImageExample.tsx
Original file line number Diff line number Diff line change
@@ -1,50 +1,25 @@
"use client"

import {
Coordinates,
Image,
Mafs,
Image,
Coordinates,
useMovablePoint,
} from "mafs"

import image from "./mafs.png"

export default function ImageExample() {
const origin = useMovablePoint([3, 3])
const padding = 0.1
const origin = useMovablePoint([1, 1])

return (
<Mafs viewBox={{ x: [-1, 7], y: [-1, 5] }}>
<Coordinates.Cartesian />
<Image
href={image.src ?? image}
anchor="tl"
x={origin.x + padding}
y={origin.y - padding}
width={2}
height={2}
/>
<Image
href={image.src ?? image}
anchor="tr"
x={origin.x - padding}
y={origin.y - padding}
width={2}
height={2}
/>
<Image
href={image.src ?? image}
anchor="bl"
x={origin.x + padding}
y={origin.y + padding}
width={2}
height={2}
/>
<Image
href={image.src ?? image}
anchor="br"
x={origin.x - padding}
y={origin.y + padding}
x={origin.x}
y={origin.y}
width={2}
height={2}
/>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/display/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface ImageProps {
* This is passed directly to the `preserveAspectRatio` attribute of the SVG
* `<image>` element.
*
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio
* See [preserveAspectRatio](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio) on MDN.
*/
preserveAspectRatio?: string

Expand Down

0 comments on commit 3e0a87b

Please sign in to comment.