@@ -26,7 +26,6 @@ type EditProfileDetailsButtonOptions = {
2626 dom : HTMLDocument
2727 store : LiveStore
2828 subject : NamedNode
29- header : HTMLElement
3029 onSaved : ( ) => void
3130}
3231
@@ -190,24 +189,26 @@ export function appendProfileLinks (
190189
191190export function createEditProfileDetailsButton (
192191 options : EditProfileDetailsButtonOptions
193- ) : HTMLButtonElement {
194- const { dom, store, subject, header , onSaved } = options
195- const button = dom . createElement ( 'button' )
192+ ) : HTMLElement {
193+ const { dom, store, subject, onSaved } = options
194+ const button = dom . createElement ( 'solid-ui- button' )
196195 button . type = 'button'
197- button . className = 'social-pane__edit-button'
196+ button . className = 'social-pane__edit-button profile__action-button profile__heading-action-button profile-action-text flex-center profile-section-collapsible__edit-button'
197+ button . variant = 'secondary'
198+ button . size = 'sm'
199+
200+ const label = dom . createElement ( 'span' )
201+ label . className = 'profile-section-collapsible__edit-label social-pane__edit-button-label'
202+ label . innerHTML = `${ editIcon } Edit`
203+ button . appendChild ( label )
198204
199205 const icon = dom . createElement ( 'span' )
200- icon . className = 'social-pane__edit-button-icon'
206+ icon . className = 'profile-section-collapsible__edit-icon social-pane__edit-button-icon'
207+ icon . setAttribute ( 'aria-hidden' , 'true' )
201208 icon . innerHTML = editIcon
202209 button . appendChild ( icon )
203210
204- const label = dom . createElement ( 'span' )
205- label . className = 'social-pane__edit-button-label'
206- label . textContent = 'Edit'
207- button . appendChild ( label )
208-
209211 button . setAttribute ( 'aria-label' , 'Edit profile links' )
210- header . style . position = 'relative'
211212
212213 const openDialog = ( ) => {
213214 const initialValues = readProfileLinkValues ( store , subject )
@@ -281,16 +282,26 @@ export function createEditProfileDetailsButton (
281282 fieldLabel . textContent = field . label
282283 fieldHeader . appendChild ( fieldLabel )
283284
284- const addButton = dom . createElement ( 'button' )
285+ const addButton = dom . createElement ( 'solid-ui- button' )
285286 addButton . type = 'button'
286- addButton . className = 'social-pane__dialog-row-button social-pane__dialog-row-button --add'
287+ addButton . className = 'social-pane__dialog-row-button--add'
287288 addButton . setAttribute ( 'aria-label' , `Add another ${ field . label . toLowerCase ( ) } ` )
289+ addButton . variant = 'secondary'
290+ addButton . size = 'sm'
291+ const addButtonContent = dom . createElement ( 'span' )
292+ addButtonContent . className = 'social-pane__add-more-content'
293+ const addButtonInline = dom . createElement ( 'span' )
294+ addButtonInline . className = 'social-pane__add-more-inline'
288295 const addButtonIcon = dom . createElement ( 'span' )
289- addButtonIcon . className = 'social-pane__dialog-row-button- icon social-pane__dialog-row-button-icon--add '
296+ addButtonIcon . className = 'social-pane__add-more- icon'
290297 addButtonIcon . setAttribute ( 'aria-hidden' , 'true' )
291298 addButtonIcon . innerHTML = plusIcon
292- addButton . appendChild ( addButtonIcon )
293- addButton . appendChild ( dom . createTextNode ( 'Add More' ) )
299+ const addButtonText = dom . createElement ( 'span' )
300+ addButtonText . textContent = 'Add More'
301+ addButtonInline . appendChild ( addButtonIcon )
302+ addButtonInline . appendChild ( addButtonText )
303+ addButtonContent . appendChild ( addButtonInline )
304+ addButton . appendChild ( addButtonContent )
294305 addButton . addEventListener ( 'click' , ( ) => {
295306 formState [ field . key ] . push ( '' )
296307 renderFields ( { fieldKey : field . key , rowIndex : formState [ field . key ] . length - 1 } )
@@ -324,7 +335,7 @@ export function createEditProfileDetailsButton (
324335 removeButton . setAttribute ( 'aria-label' , `Remove ${ field . label . toLowerCase ( ) } ${ index + 1 } ` )
325336 removeButton . setAttribute ( 'title' , 'Remove' )
326337 removeButton . variant = 'icon'
327- removeButton . size = 'sm '
338+ removeButton . size = 'md '
328339 const removeButtonIcon = dom . createElement ( 'span' )
329340 removeButtonIcon . className = 'social-pane__dialog-row-button-icon social-pane__dialog-row-button-icon--remove'
330341 removeButtonIcon . setAttribute ( 'slot' , 'icon' )
0 commit comments