-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: updated create shape method and snap to grid * fix: cleanup * feat: drawing-toolbar redesign * fix: button size * fix: design review fixes * fix: design review fixes-2 * fix: QA Fixes * Minifix * fix: font icon in toolbar * feat: new Keyboard constants * fix: design review * aftermerge * fix: codereview * fix: react-floater * fix: react-floater * Prod versions * fix: css vars
- Loading branch information
Showing
78 changed files
with
7,265 additions
and
1,856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
.horizontalDivider { | ||
border-bottom: 1px solid #E9E9E9; | ||
margin: 5px 0; | ||
border-bottom: 1px solid #D5D7E1; | ||
margin: 12px 0; | ||
width: 100%; | ||
} | ||
|
||
.verticalDivider { | ||
border-left: 1px solid #E9E9E9; | ||
margin: 5px 6px; | ||
border-left: 1px solid #D5D7E1; | ||
margin: 0; | ||
} |
70 changes: 31 additions & 39 deletions
70
packages/drawing-toolbar/src/components/font-settings.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,38 @@ | ||
import React from 'react' | ||
|
||
import { ToolbarButton } from './toolbar-button' | ||
import IconText32 from '../icons/text-settings-32-icon.svg' | ||
import IconText48 from '../icons/text-settings-48-icon.svg' | ||
import IconText64 from '../icons/text-settings-64-icon.svg' | ||
|
||
import css from './settings.module.css' | ||
import { IconGroupSettings } from './icon-group-settings' | ||
|
||
const fontSizes = [32, 48, 64] | ||
const testAttributes = ['board-panel-popup-font-size-s', 'board-panel-popup-font-size-m', 'board-panel-popup-font-size-l'] | ||
const testAttributes = { | ||
[fontSizes[0]]: 'board-panel-popup-font-size-s', | ||
[fontSizes[1]]: 'board-panel-popup-font-size-m', | ||
[fontSizes[2]]: 'board-panel-popup-font-size-l', | ||
} | ||
|
||
export const FontItem = ({ | ||
active = false, | ||
dataTestId, | ||
fontSize, | ||
handleClick, | ||
innerRef, | ||
}) => ( | ||
<ToolbarButton | ||
active={active} | ||
dataTestId={dataTestId} | ||
innerRef={innerRef} | ||
onClick={() => handleClick(fontSize)} | ||
> | ||
<div | ||
className={css.fontItem} | ||
style={{ fontSize: `${fontSize / 2}px` }} | ||
> | ||
a | ||
</div> | ||
</ToolbarButton> | ||
) | ||
export const FontSettings = ({ | ||
currentFontSize, handleClick, | ||
}) => { | ||
const fontIcons = { | ||
[fontSizes[0]]: (<IconText32 />), | ||
[fontSizes[1]]: (<IconText48 />), | ||
[fontSizes[2]]: (<IconText64 />), | ||
} | ||
|
||
export const FontSettings = ({ currentFontSize, handleClick }) => ( | ||
<div className={css.wrapper}> | ||
<div className={css.row}> | ||
{fontSizes.map((itemFontSize, index) => ( | ||
<FontItem | ||
active={currentFontSize === itemFontSize} | ||
dataTestId={testAttributes[index]} | ||
fontSize={itemFontSize} | ||
handleClick={handleClick} | ||
key={itemFontSize} | ||
/> | ||
))} | ||
</div> | ||
</div> | ||
) | ||
const iconsSet = fontSizes.map(size => ({ | ||
dataTestId: testAttributes[size], | ||
key: size, | ||
icon: fontIcons[size], | ||
})) | ||
|
||
return ( | ||
<IconGroupSettings | ||
iconsSet={iconsSet} | ||
currentSelection={currentFontSize} | ||
handleClick={handleClick} | ||
/> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/drawing-toolbar/src/components/settings-group.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.floater { | ||
user-select: none; | ||
padding: 8px; | ||
padding: 0; | ||
} | ||
|
||
.anchor { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.