GithubHelp home page GithubHelp logo

simenandre / next-theme-ui Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 247 KB

Makes it easier to combine NextJS with Theme UI! ๐Ÿ–๏ธ

License: Apache License 2.0

TypeScript 100.00%
nextjs theme-ui typescript

next-theme-ui's Introduction

Theme-UI Components for Next.js

This package contains a few small components to help using Theme UI with Next.js.

Specifically, this means <Link> and <NavLink>. If you use the components from this package, the components will be using <Link /> components from next/link instead of a regular <a />.

Quickstart

โ–ถ yarn add next-theme-ui

Replace these imports:

import { Link } from '@theme-ui/components';
import { NavLink } from '@theme-ui/components';

with

import { Link } from 'next-theme-ui';
import { NavLink } from 'next-theme-ui';

Contribute

Please open issues if you have questions or issues. I'm trying to keep this package as small as possible, so before adding any components, please open an issue we can discuss.

next-theme-ui's People

Contributors

renovate[bot] avatar simenandre avatar github-actions[bot] avatar dependabot[bot] avatar

Stargazers

OMPedr0_ avatar Nurudeen Yekeen avatar

Watchers

 avatar

next-theme-ui's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @cobraz/prettier-config Unavailable

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): lock file maintenance

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/codeql-analysis.yml
  • actions/checkout v4@3df4ab11eba7bda6032a0b82a6bb43b11571feac
  • github/codeql-action v2
  • github/codeql-action v2
  • github/codeql-action v2
.github/workflows/pull_request.yml
  • actions/checkout v4@3df4ab11eba7bda6032a0b82a6bb43b11571feac
  • actions/setup-node v3
.github/workflows/push.yml
  • actions/checkout v4@3df4ab11eba7bda6032a0b82a6bb43b11571feac
  • google-github-actions/release-please-action v3
  • actions/setup-node v3
npm
package.json
  • @bjerk/eslint-config ^4.0.0
  • @cobraz/prettier-config ^1.0.1
  • @theme-ui/components ^0.15.0
  • @tsconfig/next ^1.0.0
  • @types/react ^18.0.0
  • next ^13.0.0
  • react ^18.0.0
  • typescript ^5.0.0
  • @theme-ui/components ^0.15.0
  • next ^13.0.0
  • react ^18.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Image not passing `loader` and `layout` props correctly to Next Image

Describe the bug
The loader attribute is not applied to next-theme-ui's Image correctly. Next throws an error:

Unhandled Runtime Error
Error: Image with src "/customers/grid-branding.svg" is missing "loader" prop.
Read more: https://nextjs.org/docs/messages/next-image-missing-loader

To Reproduce
Steps to reproduce the behavior:

  1. Create a Next project
  2. Create a custom imageLoader and set up custom loader configuration in next.config.js
  3. Use the Image component from next-theme-ui
  4. Set the loader attribute on your image

Expected behavior
I would expect the app to load my images correctly using the custom loader, as they do just fine with the normal Next Image

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser chrome
  • Version Version 98.0.4758.80 (Official Build) (arm64)

Additional context
This is my loader:

export const imageLoader: ImageLoader = ({ src }) => {
  return src;
};

It works just fine with the standard Next Image (but then I can't use sx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.