File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import { tooltip } from ' $lib/components/Tooltip.svelte' ;
3+ import Icon from ' $lib/components/icons/Icon.svelte' ;
34 import { DIALOG_COLOR_PALETTE , DEFAULT_NODE_COLOR } from ' $lib/utils/colors' ;
45
56 interface Props {
4950
5051<div class =" color-picker-wrapper" data-tour =" block-color-picker" >
5152 <button class ="picker-btn" class:ghost ={variant === ' ghost' } onclick ={toggle } aria-label ="Change color" use:tooltip ={{ text : ' Color' , position : tooltipPosition }}>
52- <svg width ={iconSize } height ={iconSize } viewBox ="0 0 24 24" fill ="none" stroke ={iconColor || ' currentColor' } stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" >
53- <circle cx =" 12" cy =" 12" r =" 10" />
54- <circle cx ="8" cy ="10" r ="1.5" fill ={iconColor || ' currentColor' }/>
55- <circle cx ="12" cy ="7" r ="1.5" fill ={iconColor || ' currentColor' }/>
56- <circle cx ="16" cy ="10" r ="1.5" fill ={iconColor || ' currentColor' }/>
57- <circle cx ="15" cy ="15" r ="2" fill ={iconColor || ' currentColor' }/>
58- </svg >
53+ <span class ="icon-wrap" style ={iconColor ? ` color: ${iconColor }; ` : ' ' }>
54+ <Icon name ="palette" size ={iconSize } />
55+ </span >
5956 </button >
6057 {#if isOpen }
6158 <!-- svelte-ignore a11y_click_events_have_key_events -->
119116 color : var (--text );
120117 }
121118
119+ .icon-wrap {
120+ display : inline-flex ;
121+ }
122+
122123 /* Ghost variant for annotation nodes - minimal styling */
123124 .picker-btn.ghost {
124125 width : auto ;
Original file line number Diff line number Diff line change 8585 <line x 1=" 12" y 1=" 17" x 2=" 12" y 2=" 22" />
8686 <path d =" M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z" />
8787 </svg >
88+ {:else if name === ' palette' }
89+ <svg width ={size } height ={size } viewBox =" 0 0 24 24" fill =" none" stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" >
90+ <path d =" M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z" />
91+ <circle cx =" 13.5" cy =" 6.5" r =" .5" fill =" currentColor" />
92+ <circle cx =" 17.5" cy =" 10.5" r =" .5" fill =" currentColor" />
93+ <circle cx =" 6.5" cy =" 12.5" r =" .5" fill =" currentColor" />
94+ <circle cx =" 8.5" cy =" 7.5" r =" .5" fill =" currentColor" />
95+ </svg >
8896{:else if name === ' pin-filled' }
8997 <svg width ={size } height ={size } viewBox =" 0 0 24 24" fill =" currentColor" stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" >
9098 <line x 1=" 12" y 1=" 17" x 2=" 12" y 2=" 22" />
You can’t perform that action at this time.
0 commit comments