Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
kadiryazici committed Jan 22, 2025
1 parent b88a34a commit d059cd7
Showing 1 changed file with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import classNames from 'classnames'
import { type ChangeEvent, type HTMLAttributes, type KeyboardEvent, type PropsWithChildren, useCallback, useState } from 'react';
import {
type ChangeEvent,
type HTMLAttributes,
type KeyboardEvent,
type PropsWithChildren,
useCallback,
useState,
} from 'react'

import { CheckIcon } from 'lib/icons/Check.js'
import { CloseIcon } from 'lib/icons/Close.js'
Expand Down Expand Up @@ -124,7 +131,9 @@ export function SeamEditableDeviceName({
<span className='seam-editable-device-name-icon-wrapper'>
<ActionButtons
editing={editing}
onEdit={() => { setEditing(true) }}
onEdit={() => {
setEditing(true)
}}
onCancel={handleCancel}
onCheck={handleCheck}
/>
Expand All @@ -144,9 +153,7 @@ interface NameViewProps {

function NameView(props: NameViewProps): JSX.Element {
if (!props.editing) {
return (
<span>{props.value}</span>
)
return <span>{props.value}</span>
}

return (
Expand Down Expand Up @@ -193,10 +200,9 @@ function ActionButtons(props: ActionButtonsProps): JSX.Element {
)
}


return (
<IconButton onClick={props.onEdit}>
<EditIcon width='1em' height='1em' viewBox='0 0 24 24' />
</IconButton>
)
}
}

0 comments on commit d059cd7

Please sign in to comment.