Skip to content

feat(config): allow adding prefix to class names #537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

vnphanquang
Copy link
Contributor

help with #536

export let language = "javascript"
export let source = ""
export let transform = (x) => x
let element, formattedCode
$: $$props && (source || element) && highlightCode()
Copy link
Contributor Author

@vnphanquang vnphanquang Mar 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replaced by the afterUpdate below. This is to support correct re-rendering when the dynamic global prefix value changes (element won't change here, so the content is not updated accordingly)

@@ -0,0 +1,21 @@
export function replace(node, parameters = {}) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example Usage:

<p use:replace={{ search: '$$', to: $prefix }}>
 Some content: $$ will be replaced with prefix
</p>

@saadeghi saadeghi merged commit 49e05fa into saadeghi:master Mar 2, 2022
inorganik pushed a commit to inorganik/daisyui that referenced this pull request Feb 7, 2023
* feat(src/index): postcss-js inject prefix for components & their associated utilities if specified

* docs: add instruction for `prefix` at /docs/config

* docs(prefix): add globlal prefix store for user to customize display of class names

* refactor(docs.components): use prefix store & action for html display

* fix: load prefix from daisyui user's config
imgbot bot pushed a commit to Avensen/daisyui that referenced this pull request Jun 5, 2023
* feat(src/index): postcss-js inject prefix for components & their associated utilities if specified

* docs: add instruction for `prefix` at /docs/config

* docs(prefix): add globlal prefix store for user to customize display of class names

* refactor(docs.components): use prefix store & action for html display

* fix: load prefix from daisyui user's config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants