Skip to content

Commit 8204c50

Browse files
authored
feat: show license on package card (#159)
1 parent 0983604 commit 8204c50

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

app/components/PackageCard.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ const emit = defineEmits<{
8484
/>
8585
</dd>
8686
</div>
87+
<div v-if="result.package.license" class="flex items-center gap-1.5">
88+
<dt class="sr-only">License</dt>
89+
<dd>{{ result.package.license }}</dd>
90+
</div>
8791
</dl>
8892
</div>
8993
<!-- Mobile: downloads on separate row -->

shared/types/npm-registry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export interface NpmSearchPackage {
147147
author?: NpmPerson
148148
publisher?: NpmSearchPublisher
149149
maintainers?: NpmPerson[]
150+
license?: string
150151
}
151152

152153
export interface NpmSearchScore {

0 commit comments

Comments
 (0)