Skip to content

Commit d059cd7

Browse files
committed
Format
1 parent b88a34a commit d059cd7

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/lib/seam/components/SeamEditableDeviceName/SeamEditableDeviceName.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import classNames from 'classnames'
2-
import { type ChangeEvent, type HTMLAttributes, type KeyboardEvent, type PropsWithChildren, useCallback, useState } from 'react';
2+
import {
3+
type ChangeEvent,
4+
type HTMLAttributes,
5+
type KeyboardEvent,
6+
type PropsWithChildren,
7+
useCallback,
8+
useState,
9+
} from 'react'
310

411
import { CheckIcon } from 'lib/icons/Check.js'
512
import { CloseIcon } from 'lib/icons/Close.js'
@@ -124,7 +131,9 @@ export function SeamEditableDeviceName({
124131
<span className='seam-editable-device-name-icon-wrapper'>
125132
<ActionButtons
126133
editing={editing}
127-
onEdit={() => { setEditing(true) }}
134+
onEdit={() => {
135+
setEditing(true)
136+
}}
128137
onCancel={handleCancel}
129138
onCheck={handleCheck}
130139
/>
@@ -144,9 +153,7 @@ interface NameViewProps {
144153

145154
function NameView(props: NameViewProps): JSX.Element {
146155
if (!props.editing) {
147-
return (
148-
<span>{props.value}</span>
149-
)
156+
return <span>{props.value}</span>
150157
}
151158

152159
return (
@@ -193,10 +200,9 @@ function ActionButtons(props: ActionButtonsProps): JSX.Element {
193200
)
194201
}
195202

196-
197203
return (
198204
<IconButton onClick={props.onEdit}>
199205
<EditIcon width='1em' height='1em' viewBox='0 0 24 24' />
200206
</IconButton>
201207
)
202-
}
208+
}

0 commit comments

Comments
 (0)