Bot releases are visible (Hide)
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
7611533: Revert "fix: fix Document component"
This reverts commit 2c2e7e231d1127d4262bd9cb26164d3df85036ba.
6201155: Revert "fix: revert Document fix"
This reverts commit 41a70cd4e0684a9f6e26c66b6495e456417a9ec7.
3afd933: Revert "fix: SSR for next/image
and Next.js router"
This reverts commit 394afc19f2c4b20e992ed3058aa386c1d3d22301.
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
next/image
and Next.js' router.Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
includes
on non-string value when suppressing React warnings.Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
The last release, 0.0.8
didn't properly fix the useInsertionEffect
issue. This time it's for real, though!
useInsertionEffect
, making sure that transpilers will not attempt to inline the import specifier.Published by github-actions[bot] over 2 years ago
useInsertionEffect
to be referenced directly in import specifiers.Published by github-actions[bot] over 2 years ago
Number
control.Select
control.Image
control.TextArea
control.Checkbox
control.Color
control.TextInput
control.List
and Shape
controls.Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
e14fac2: Opt in to useInsertionEffect
with Style control.
a8272e8: Fix Width control mapping so that it uses maxWidth
instead of width
.
6b36df9: Suppress React warning when passing ref to function component.
c410d49: Revert change that used react-is
to detect when to forward ref.
Unfortunately using react-is
won't work since isForwardRef
doesn't give the correct result is the component uses React.memo
, React.lazy
, or similar variants. Also, react-is
would need to be a peer dependency, increasing the integration burden.
Published by github-actions[bot] over 2 years ago
82f6afc: Suppress findDOMNode warning.
a1c8c6a: Fix issue with Navigation builtin component and using colors.
5756f33: Use react-is to determine when to forward ref.
a87afe0: Automatically find DOM nodes if registered component doesn't forward the ref.
This functionality relies on findDOMNode
, which has been deprecated in StrictMode
. This means that in StrictMode
users will see a warning. Moreover, since we're passing the ref
prop to registered components regardless, if the ref isn't forwarded, users will see a warning from React during development prompting them to forward the ref.
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
3c5fb6b: Add Style
control
The Style
control can be used to control CSS properties such as width, margin, padding, border, and border-radius.
For example:
import { ReactRuntime } from "@makeswift/runtime/react";
import { Style } from "@makeswift/runtime/controls";
ReactRuntime.registerComponent(HelloWorld, {
type: "hello-world",
label: "Hello, world!",
props: {
className: Style()
}
});
const HelloWorld = forwardRef(function HelloWorld(props, ref) {
return (
<p {...props} ref={ref}>
Hello, world!
</p>
);
});
By default Style
is configured to provide width and margin overlays and panels. This can be overwritten with the properties
configuration option.
For example:
import { ReactRuntime } from '@makeswift/runtime/react'
import { Style } from '@makeswift/runtime/controls'
ReactRuntime.registerComponent(HelloWorld, {
type: 'hello-world',
label: 'Hello, world!',
props: {
- className: Style(),
+ className: Style({
+ properties: [Style.Width, Style.Margin, Style.Padding],
+ }),
}
})
You can also enable all suppored properties by using the special Style.All
preset.
For example:
import { ReactRuntime } from '@makeswift/runtime/react'
import { Style } from '@makeswift/runtime/controls'
ReactRuntime.registerComponent(HelloWorld, {
type: 'hello-world',
label: 'Hello, world!',
props: {
- className: Style({
- properties: [Style.Width, Style.Margin, Style.Padding],
- }),
+ className: Style({ properties: Style.All }),
}
})
Read more about the Style
control in our API Reference.