ui: replace copy text button with icon button (lucide-style copy/check)
This commit is contained in:
1 parent
4f43c5f89c
commit
fd12df7d39
1 file changed
+14
-1
+14
-1
@@ -8,6 +8,7 @@ import {
|
||||
IconButton,
|
||||
IconExpand24,
|
||||
IconCollapse24,
|
||||
IconCheck24,
|
||||
useWindowResize
|
||||
} from '@create-figma-plugin/ui'
|
||||
import { emit, on } from '@create-figma-plugin/utilities'
|
||||
@@ -166,7 +167,19 @@ function Plugin () {
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<Muted>{currentWindowSize.width} × {currentWindowSize.height}</Muted>
|
||||
<div style={{ display: 'flex', gap: '4px', alignItems: 'center' }}>
|
||||
<Button onClick={copyInfo}>{copied ? '✓ Скопировано' : '📋 Копир.'}</Button>
|
||||
<IconButton
|
||||
title="Копировать значения переменных"
|
||||
onClick={copyInfo}
|
||||
>
|
||||
{copied
|
||||
? <IconCheck24 />
|
||||
: (
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
|
||||
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
|
||||
</svg>
|
||||
)}
|
||||
</IconButton>
|
||||
<IconButton
|
||||
title={isMaximized ? 'Свернуть окно' : 'Развернуть окно'}
|
||||
onClick={toggleWindowSize}
|
||||
|
||||
Reference in new issue
Block a user