Skip to content

Commit 1ad9120

Browse files
committed
fix types and import
1 parent 446d283 commit 1ad9120

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

src/social/editProfileDetails.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ ns.foaf('schoolHomepage')
1515
and save it to the Webid. You can look in
1616
Dev2025/profile-pane/src/sections/heading/mutations to see how
1717
to write this data in the profile. */
18+
type SolidUIButton = HTMLElement & {
19+
type: string
20+
variant: string
21+
size: string
22+
label: string
23+
disabled: boolean
24+
}
25+
1826
type ProfileLinkField = {
1927
key: 'homepage' | 'weblog' | 'workplaceHomepage' | 'schoolHomepage'
2028
label: string
@@ -205,7 +213,7 @@ export function createEditProfileDetailsButton (
205213
options: EditProfileDetailsButtonOptions
206214
): HTMLElement {
207215
const { dom, store, subject, onSaved } = options
208-
const button = dom.createElement('solid-ui-button')
216+
const button = dom.createElement('solid-ui-button') as SolidUIButton
209217
button.type = 'button'
210218
button.className = 'social-pane__edit-button profile__action-button profile__heading-action-button profile-action-text flex-center profile-section-collapsible__edit-button'
211219
button.variant = 'secondary'
@@ -286,7 +294,7 @@ export function createEditProfileDetailsButton (
286294
fieldLabel.textContent = field.label
287295
fieldHeader.appendChild(fieldLabel)
288296

289-
const addButton = dom.createElement('solid-ui-button')
297+
const addButton = dom.createElement('solid-ui-button') as SolidUIButton
290298
addButton.type = 'button'
291299
addButton.className = 'social-pane__dialog-row-button--add'
292300
addButton.setAttribute('aria-label', `Add another ${field.label.toLowerCase()}`)
@@ -333,7 +341,7 @@ export function createEditProfileDetailsButton (
333341
})
334342
row.appendChild(input)
335343

336-
const removeButton = dom.createElement('solid-ui-button')
344+
const removeButton = dom.createElement('solid-ui-button') as SolidUIButton
337345
removeButton.type = 'button'
338346
removeButton.className = 'social-pane__dialog-row-button--remove'
339347
removeButton.setAttribute('aria-label', `Remove ${field.label.toLowerCase()} ${index + 1}`)
@@ -375,7 +383,7 @@ export function createEditProfileDetailsButton (
375383
actions.className = 'social-pane__dialog-actions'
376384
form.appendChild(actions)
377385

378-
const closeButton = dom.createElement('solid-ui-button')
386+
const closeButton = dom.createElement('solid-ui-button') as SolidUIButton
379387
closeButton.type = 'button'
380388
closeButton.className = 'social-pane__dialog-button--cancel'
381389
closeButton.setAttribute('aria-label', 'Close dialog')
@@ -384,7 +392,7 @@ export function createEditProfileDetailsButton (
384392
closeButton.size = 'md'
385393
actions.appendChild(closeButton)
386394

387-
const saveButton = dom.createElement('solid-ui-button')
395+
const saveButton = dom.createElement('solid-ui-button') as SolidUIButton
388396
saveButton.type = 'button'
389397
saveButton.className = 'social-pane__dialog-button--save'
390398
saveButton.label = 'Save Changes'

src/social/socialSections.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DataBrowserContext } from 'pane-registry'
2-
import { createAddMeToYourFriendsButton } from 'profile-pane/lib/specialButtons/addMeToYourFriends'
2+
import { createAddMeToYourFriendsButton } from 'profile-pane'
33
import { Statement, NamedNode } from 'rdflib'
44
import { ns, utils, widgets } from 'solid-ui'
55
import { appendProfileLinks, createEditProfileDetailsButton } from './editProfileDetails'

0 commit comments

Comments
 (0)