-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(config): allow adding prefix to class names #537
Conversation
…ciated utilities if specified
export let language = "javascript" | ||
export let source = "" | ||
export let transform = (x) => x | ||
let element, formattedCode | ||
$: $$props && (source || element) && highlightCode() |
There was a problem hiding this comment.
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 = {}) { |
There was a problem hiding this comment.
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>
* 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
* 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
help with #536