Skip to content

It's just an util function to help surfacing styles with less code

License

Notifications You must be signed in to change notification settings

jsellam/remix-surfacing-links

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

remix-surfacing-links

This library reduces boilerplate for surfacing links in remix.run projects.

Installation

npm install remix-surfacing-links

Usage in atom component

import surfaceLinks from "remix-surfacing-links";

export const links = surfaceLinks({
  rel: "stylesheet",
  href: require("./styles.css"),
});

Usage in page or intermediate component

You can import children links this way:

import surfaceLinks from "remix-surfacing-links";

export const links = surfaceLinks(
  require("~/components/Button"),
  require("~/components/Toggle"),
  require("~/components/Modal"),
  {
    rel: "stylesheet",
    href: require("~/styles/homepage.css"),
  }
);

About

It's just an util function to help surfacing styles with less code

Resources

License

Stars

Watchers

Forks

Packages

No packages published