goetzrobin / spartan

Cutting-edge tools powering Angular full-stack development.
https://spartan.ng
MIT License
1.31k stars 137 forks source link

Doc on avatar #59

Closed jeremy-js-devweb closed 10 months ago

jeremy-js-devweb commented 10 months ago

Please provide the environment you discovered this bug in.

In prod on https://www.spartan.ng/components/avatar loading section.

Which area/package is the issue in?

avatar

Description

you can change the doc

from

import { Component } from '@angular/core';
import { HlmAvatarComponent } from '@spartan-ng/ui-avatar-helm';

@Component({
  selector: 'spartan-avatar-preview',
  standalone: true,
  imports: [HlmAvatarComponent],
  template: `
    <hlm-avatar>
      <img src='/assets/avatar.png' alt='spartan logo. Resembling a spartanic shield' hlmAvatarImage />
      <span class='bg-destructive text-white' hlmAvatarFallback>RG</span>
    </hlm-avatar>
  `,
})
export class AvatarPreviewComponent {}

to

import { Component } from '@angular/core';
import { HlmAvatarComponent, HlmAvatarFallbackDirective, HlmAvatarImageDirective } from '@spartan-ng/ui-avatar-helm';

@Component({
    selector: 'spartan-avatar-preview',
    standalone: true,
    imports: [HlmAvatarImageDirective, HlmAvatarComponent, HlmAvatarFallbackDirective],
    template: `
        <hlm-avatar variant="large">
            <img src="/assets/avatar.png" alt="spartan logo. Resembling a spartanic shield" hlmAvatarImage />
            <span class="bg-[#FD005B] text-white" hlmAvatarFallback>RG</span>
        </hlm-avatar>
    `,
})
export class AvatarPreviewComponent {}

Same issue for Usage part

Please provide the exception or error you saw

No response

Other information

No response

I would be willing to submit a PR to fix this issue

goetzrobin commented 10 months ago

Should be fixed by: https://github.com/goetzrobin/spartan/commit/4d29a78c298b32491f9eb0c9c627493a04af88de