Skip to content

Lona uses these components on generated websites

Notifications You must be signed in to change notification settings

Lona/site-components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Site Components

Lona uses these components on generated websites.

Some day, they'll be replacable by the developer for custom theming.

API

See the example for usage.

In order to support websites powered by Next, Gatsby, etc, you'll likely want to provide a custom Link component via the LinkContext. For example:

import { LinkContext, LinkProps } from '@lona/site-components'

// This is the default Link component
const Link = (props: LinkProps) => <a {...props} />

function App() {
  return (
    <LinkContext.Provider value={Link}>
      {/* Your components here */}
    </LinkContext.Provider>
  )
}

You can optionally modify the href prop if needed, or use it to determine which component to render (e.g. for internal vs external urls).