Skip to content

Commit 586d8f2

Browse files
committed
Fix styling and move styles panel
Fix outline none problems Change colors to twind colors Move styles panel down
1 parent ea4dde3 commit 586d8f2

File tree

17 files changed

+70
-35
lines changed

17 files changed

+70
-35
lines changed

packages/tldraw/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modfy/tldraw",
3-
"version": "1.9.5",
3+
"version": "1.9.6",
44
"description": "A tiny little drawing app (editor)",
55
"author": "@steveruizok",
66
"repository": {

packages/tldraw/src/Tldraw.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { TldrawApp, TDCallbacks } from '~state'
66
import { TldrawContext, useStylesheet, useKeyboardShortcuts, useTldrawApp } from '~hooks'
77
import { shapeUtils } from '~state/shapes'
88
import { ToolsPanel } from '~components/ToolsPanel'
9-
import { TopPanel } from '~components/TopPanel'
109
import { ContextMenu } from '~components/ContextMenu'
1110
import { FocusButton } from '~components/FocusButton'
1211
import { TLDR } from '~state/TLDR'
@@ -311,13 +310,7 @@ interface InnerTldrawProps {
311310
const InnerTldraw = React.memo(function InnerTldraw({
312311
id,
313312
autofocus,
314-
showPages,
315-
showMenu,
316-
showMultiplayerMenu,
317-
showZoom,
318-
showStyles,
319313
showTools,
320-
showSponsorLink,
321314
readOnly,
322315
showUI,
323316
theme: userTheme = {}
@@ -493,15 +486,15 @@ const InnerTldraw = React.memo(function InnerTldraw({
493486
<FocusButton onSelect={app.toggleFocusMode} />
494487
) : (
495488
<>
496-
<TopPanel
489+
{/* <TopPanel
497490
readOnly={readOnly}
498491
showPages={showPages}
499492
showMenu={showMenu}
500493
showMultiplayerMenu={showMultiplayerMenu}
501494
showStyles={showStyles}
502495
showZoom={showZoom}
503496
showSponsorLink={showSponsorLink}
504-
/>
497+
/> */}
505498
<StyledSpacer />
506499
{showTools && !readOnly && <ToolsPanel />}
507500
</>
@@ -543,6 +536,10 @@ const StyledLayout = styled('div', {
543536
boxSizing: 'border-box',
544537
outline: 'none',
545538

539+
'&:focus': {
540+
outline: 'none !important',
541+
},
542+
546543
'& .tl-container': {
547544
position: 'absolute',
548545
top: 0,
@@ -577,7 +574,7 @@ const StyledUI = styled('div', {
577574
outline: 'none'
578575
},
579576
'& > *:focus': {
580-
outline: 'none'
577+
outline: 'none !important',
581578
},
582579
})
583580

packages/tldraw/src/components/Primitives/DropdownMenu/DMContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const StyledContent = styled(MenuContent, {
3838
height: 'fit-content',
3939
minWidth: 0,
4040
maxHeight: '75vh',
41-
overflowY: 'scroll',
41+
overflowY: 'auto',
4242
'& *': {
4343
boxSizing: 'border-box',
4444
},

packages/tldraw/src/components/Primitives/DropdownMenu/DMRadioItem.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export const DMRadioItem = styled(RadioItem, {
1616
pointerEvents: 'all',
1717
cursor: 'pointer',
1818

19+
'&:focus': {
20+
outline: 'none !important'
21+
},
22+
1923
variants: {
2024
isActive: {
2125
true: {

packages/tldraw/src/components/Primitives/IconButton/IconButton.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export const IconButton = styled('button', {
1717
display: 'grid',
1818
alignItems: 'center',
1919
justifyContent: 'center',
20+
21+
'&:focus': {
22+
outline: 'none !important'
23+
},
2024

2125
'& > *': {
2226
gridRow: 1,

packages/tldraw/src/components/Primitives/Panel/Panel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export const Panel = styled('div', {
44
backgroundColor: '$panel',
55
display: 'flex',
66
flexDirection: 'row',
7+
alignItems: 'center',
78
boxShadow: '$panel',
89
padding: '$2',
910
gap: 0,

packages/tldraw/src/components/Primitives/RowButton/RowButton.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ export const StyledRowButton = styled('button', {
107107
userSelect: 'none',
108108
margin: 0,
109109
padding: '0 0',
110+
111+
'&:focus': {
112+
outline: 'none !important'
113+
},
110114

111115
'&[data-disabled]': {
112116
opacity: 0.3,

packages/tldraw/src/components/Primitives/SmallIcon/SmallIcon.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ export const SmallIcon = styled('div', {
1313
pointerEvents: 'all',
1414
cursor: 'pointer',
1515
color: 'currentColor',
16-
16+
17+
'&:focus': {
18+
outline: 'none !important'
19+
},
20+
1721
'& svg': {
1822
height: 16,
1923
width: 16,

packages/tldraw/src/components/Primitives/ToolButton/ToolButton.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ export const StyledToolButton = styled('button', {
130130
border: 'none',
131131
height: '40px',
132132
width: '40px',
133+
134+
'&:focus': {
135+
outline: 'none !important'
136+
},
133137

134138
[`&:disabled ${StyledToolButtonInner}`]: {
135139
opacity: 0.618,

packages/tldraw/src/components/Primitives/Tooltip/Tooltip.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export function Tooltip({
3939
}
4040

4141
const StyledContent = styled(RadixTooltip.Content, {
42-
borderRadius: 3,
43-
padding: '$3 $3 $3 $3',
42+
borderRadius: '$2',
43+
padding: '$3 $4 $3 $4',
4444
fontSize: '$1',
4545
backgroundColor: '$tooltip',
4646
color: '$tooltipContrast',

0 commit comments

Comments
 (0)