Skip to content

@astrojs/preact@0.2.0

Compare
Choose a tag to compare
@github-actions github-actions released this 24 Jun 17:59
· 4851 commits to main since this release
6a60474

Minor Changes

  • #3652 7373d61c Thanks @natemoo-re! - Add support for passing named slots from .astro => framework components.

    Each slot is be passed as a top-level prop. For example:

    // From .astro
    <Component>
      <h2 slot="title">Hello world!</h2>
      <h2 slot="slot-with-dash">Dash</h2>
      <div>Default</div>
    </Component>;
    
    // For .jsx
    export default function Component({ title, slotWithDash, children }) {
      return (
        <>
          <div id="title">{title}</div>
          <div id="slot-with-dash">{slotWithDash}</div>
          <div id="main">{children}</div>
        </>
      );
    }