github withastro/astro @astrojs/preact@0.2.0

latest releases: astro@4.8.2, astro@4.8.1, @astrojs/react@3.3.4...
22 months ago

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>
        </>
      );
    }

Don't miss a new astro release

NewReleases is sending notifications on new releases.