Skip to content

Commit 0e87f88

Browse files
committed
fix: border size & color
1 parent 6e64f87 commit 0e87f88

4 files changed

Lines changed: 23 additions & 19 deletions

File tree

src/components/editor/components/toolbar/selection-toolbar/SelectionToolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function SelectionToolbar() {
4646
<div
4747
ref={ref}
4848
className={
49-
'selection-toolbar pointer-events-none transform transition-opacity duration-200 absolute z-[100] flex min-h-[32px] w-fit flex-grow items-center rounded-border-radius-border-radius-l bg-surface-primary px-2 py-xs opacity-0 shadow-toolbar'
49+
'selection-toolbar pointer-events-none transform transition-opacity duration-200 absolute z-[100] flex min-h-[32px] w-fit flex-grow items-center rounded-400 bg-surface-primary px-2 py-xs opacity-0 shadow-toolbar'
5050
}
5151
onMouseDown={(e) => {
5252
// prevent toolbar from taking focus away from editor

src/components/editor/components/toolbar/selection-toolbar/actions/Align.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ export function Align({ blockId, enabled = true }: { blockId?: string; enabled?:
140140
{activeIcon()}
141141
</ActionButton>
142142
</PopoverTrigger>
143-
<PopoverContent className="w-[200px] p-2 bg-surface-primary rounded-[6px]">
144-
<div className="flex flex-col rounded-[12px]">
143+
<PopoverContent className="w-[200px] p-2" align="start" sideOffset={5}>
144+
<div className="flex flex-col gap-1">
145145
{alignOptions.map((option, index) => (
146146
<MenuButton
147147
key={option.labelKey}

src/components/editor/components/toolbar/selection-toolbar/actions/Color.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function Color() {
133133
}}
134134
>
135135
<div
136-
className={`absolute top-0 left-0 h-full w-full cursor-pointer rounded-[6px] border-2 opacity-50 hover:opacity-100`}
136+
className={`absolute top-0 left-0 h-full w-full cursor-pointer rounded-200 border opacity-50 hover:opacity-100`}
137137
style={{
138138
borderColor: activeFontColor === color.color ? 'var(--fill-default)' : undefined,
139139
color: renderColor(color.color) || 'var(--text-title)',

src/components/editor/components/toolbar/selection-toolbar/actions/ColorHighlight.tsx

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -128,23 +128,27 @@ function ColorHighlight() {
128128
<Tooltip disableInteractive={true} key={index} title={color.label} placement={'top'}>
129129
<div
130130
key={index}
131-
className={
132-
'relative flex h-6 w-6 cursor-pointer items-center justify-center overflow-hidden rounded-[6px]'
133-
}
131+
className="relative flex h-6 w-6 cursor-pointer items-center justify-center overflow-hidden"
134132
onClick={() => handlePickedColor(EditorMarkFormat.BgColor, color.color)}
135133
>
136-
<div
137-
className={`absolute top-0 left-0 h-full w-full rounded-[6px] border-2`}
138-
style={{
139-
borderColor: activeBgColor === color.color ? 'var(--fill-default)' : undefined,
140-
}}
141-
/>
142-
<div
143-
className={'z-[1] h-full w-full opacity-50 hover:opacity-100'}
144-
style={{
145-
backgroundColor: renderColor(color.color),
146-
}}
147-
/>
134+
{activeBgColor === color.color ? (
135+
<>
136+
<div className="absolute inset-0 rounded-200 border-2 border-[#5555E0] bg-transparent pointer-events-none" />
137+
<div
138+
className="z-[1] w-4 h-4 rounded-100"
139+
style={{
140+
backgroundColor: renderColor(color.color),
141+
}}
142+
/>
143+
</>
144+
) : (
145+
<div
146+
className="w-full h-full rounded-200 border border-tertiary"
147+
style={{
148+
backgroundColor: renderColor(color.color),
149+
}}
150+
/>
151+
)}
148152
</div>
149153
</Tooltip>
150154
);

0 commit comments

Comments
 (0)