We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I don't pass stroke-width on the Vue component, in the createVueComponent function, the stroke-width option will be overwritten as undefined.
stroke-width
createVueComponent
undefined
This causes the stroke-width option set in defaultAttributes.ts to not take effect.
defaultAttributes.ts
import { h } from 'vue'; import defaultAttributes from './defaultAttributes'; import type { Icon, IconNode, IconProps } from './types'; const createVueComponent = ( type: 'outline' | 'filled', iconName: string, iconNamePascal: string, iconNode: IconNode, ): Icon => ({ size, color = 'currentColor', class: classes, stroke, ...rest }: IconProps, { attrs, slots }) => { return h( 'svg', { ...defaultAttributes[type], width: size, height: size, ...attrs, class: ['tabler-icon', `tabler-icon-${iconName}`], ...(type === 'filled' ? { fill: color, } : { 'stroke-width': stroke, stroke: color, }), ...rest, }, [...iconNode.map((child) => h(...child)), ...(slots.default ? [slots.default()] : [])], ); }; export default createVueComponent;
The text was updated successfully, but these errors were encountered:
Fall back to default if stroke is undefined
7c69efe
Fixes tabler#1067
Still actual in v3.5 This issue blocks for us upgrade from v2.
Also actual for size prop (should be 24 by default).
size
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
If I don't pass
stroke-width
on the Vue component, in thecreateVueComponent
function, thestroke-width
option will be overwritten asundefined
.This causes the
stroke-width
option set indefaultAttributes.ts
to not take effect.The text was updated successfully, but these errors were encountered: