Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/ghedamat/ember-svg-jar:
  Allow `aria-hidden` argument (#264)
  Add helper types and imports documentation (#260)
  • Loading branch information
evoactivity committed Jan 31, 2024
2 parents e55e00b + 1bd359e commit 37541cf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,24 @@ declare module '@glint/environment-ember-loose/registry' {
}
```

Should you want to manage the registry by yourself, then omit this import, and instead add the entries in your app by explicitly importing the types of the helper from this addon.
Should you want to manage the registry by yourself or are using strict mode, then omit this import, and instead add the entries in your app by explicitly importing the types of the helper from this addon. In `types/ember-svg-jar/helpers/svg-jar.d.ts`:

```ts
import SvgJar from 'ember-svg-jar/helpers/svg-jar';
import type SvgJarType from 'ember-svg-jar/types';

declare module 'ember-svg-jar/helpers/svg-jar' {
export default SvgJar as SvgJarType;
}
```

### Strict mode import

When importing the helper for strict mode, you can find it here:

```js
import svgJar from 'ember-svg-jar/helpers/svg-jar';
```

### Usage in an addon

Expand Down
1 change: 1 addition & 0 deletions packages/ember-svg-jar/addon/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface SvgJarAttrs {
fill?: string | null;
width?: string | null;
height?: string | null;
'aria-hidden'?: 'true' | 'false' | null;
class?: string | null;
role?: string | null;
title?: string | null;
Expand Down

0 comments on commit 37541cf

Please sign in to comment.