Giter Club home page Giter Club logo

chakra-ui-prose's Issues

118 kB bundle size?

After adding the withProse to the extendTheme my Next.js bundle size shot up a lot, about 118 kB.

before:
chunks/pages/_app-57c7e4e7ff00db3f.js  52.3 kB
after:
chunks/pages/_app-af31a7e4f630c391.js  170 kB

Considering that the source in this repo is ~ 4 kB I don't know what is happening here. Is this expected or is something wrong?

If this is expected, is it possible to only include the withProse in specific routes (nested ChakraProvider)?

Chakra v2 & React 18

Hello,
This package doesn't work with Chakra v2 or React 18... Is there a temparary fix that I can use while we wait for an update?

dangerouslySetInnerHTML doesn't work

Hi, I'd like to use chakra-ui-prose to render contents coming from Strapi CMS to Next.js app as string with HTML. Unfortunately dangerouslySetInnerHTML doesn't work and I can't render it. I tried sorting this out myself, but I get various misuse of React Hooks errors when I'm trying to build the library locally (React versions are the same).

Here's what I tried

ES6 import error "CommonJS module"

On Netlify I got this error:

4:54:08 PM: file:///opt/build/repo/dist/server/entries/renderer_default-page-server.mjs:6
4:54:08 PM: import { withProse } from "@nikolovlazar/chakra-ui-prose";
4:54:08 PM:          ^^^^^^^^^
4:54:08 PM: SyntaxError: Named export 'withProse' not found. The requested module '@nikolovlazar/chakra-ui-prose' is a CommonJS module, which may not support all module.exports as named exports.
4:54:08 PM: CommonJS modules can always be imported via the default export, for example using:
4:54:08 PM: import pkg from '@nikolovlazar/chakra-ui-prose';
4:54:08 PM: const { withProse } = pkg;
4:54:08 PM:     at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)

I'm using pnpm, and this is the version of chakra-ui-prose:

'@nikolovlazar/chakra-ui-prose':
    specifier: ^1.2.1
    version: 1.2.1(@chakra-ui/[email protected])(@chakra-ui/[email protected])([email protected])

Converting markdown html to chakra-ui? or a set of styles to overrule basic elements

My excuse if this is not the right place to ask this question but I literally could not find anywhere or other feasible solutions to render markdown html or html in that matter as chakra-ui.

So I tried prose and its great but now I have to manually set styles beside my chakra-ui theme to format the html. I find it unbelievable there seems to be no solid solution to convert html to chakra-ui and since prose is really nice it still is not really a 'clean' solution because on have to define all the styles.

For example I render a blog post from markdown with some bullet list and general html elements but for example the padding between the bullets is to high.

Is there perhaps a feasable solution to convert html to chakra-ui markup?
Again I know this is not perhaps the right place to ask but could not find any pointers to get in the right direction.

Using Prose If i fiddle with the styles enough I could get a acceptable solution but this feels very unclean to me, one would want to set styling 1 time in the chakra-ui theme and use that everywhere.

Skip selected part of HTML

I would like to be able to skip certain parts of the HTML. E.g. something wrapped in a
<div class='skip-prose-styling'></div>
would not be styled with prose styles, but rather with chakra theme (that excludes prose stylings)
Is it possible. If yes how can I work this out?

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.