@@ -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+
1826type 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'
0 commit comments