Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ad80204
Add BorderControl component
aaronrobertshaw Jan 4, 2022
08a4aaf
Improve docs and comments for width prop
aaronrobertshaw Feb 18, 2022
45b2fd9
Target BackdropUI instead of div for removing border
aaronrobertshaw Feb 18, 2022
3c072f3
Add RTL styles
aaronrobertshaw Feb 18, 2022
a6be837
Switch BorderControlStylePicker to use inner Flex component
aaronrobertshaw Feb 18, 2022
95a74a7
Refactor label styles
aaronrobertshaw Feb 18, 2022
a7ecb60
Add cx to useMemo deps
aaronrobertshaw Feb 18, 2022
a3fd0e0
Use StyledField to target slider margin removal
aaronrobertshaw Feb 18, 2022
f6cbe7f
Fix type ignoring for color components
aaronrobertshaw Feb 18, 2022
8d1c5a1
Move color indicator wrapper styles to dynamic class
aaronrobertshaw Feb 18, 2022
51574d6
Use React.ForwardRef<any> for typing
aaronrobertshaw Feb 18, 2022
3e23b82
Use Root to target UnitControl wrapper
aaronrobertshaw Feb 18, 2022
757da54
Add default to docs for shouldSanitizeBorder
aaronrobertshaw Feb 18, 2022
c1f7f53
Add default to type docs for enableStyle
aaronrobertshaw Feb 18, 2022
81bfad0
Update width type to CSSProperties['width']
aaronrobertshaw Feb 18, 2022
cf87f11
Add default for enableStyle to dropdown js docs
aaronrobertshaw Feb 18, 2022
0b79b77
Remove extraneous width style
aaronrobertshaw Feb 18, 2022
57d87ef
Fix unit and value parsing after changes to UnitControl utils
aaronrobertshaw Mar 15, 2022
202800c
Make inner unit control fill available height
aaronrobertshaw Mar 15, 2022
dfe7470
Add tooltip for border style options
aaronrobertshaw Mar 16, 2022
9be938d
Improve typing for colors array
aaronrobertshaw Mar 16, 2022
1782b43
Improve aria labels for color and style popover toggle button
aaronrobertshaw Mar 16, 2022
b17da1a
Comment explaining color indicator styling choice
aaronrobertshaw Mar 16, 2022
b8da8d4
Only show border on indicator when style has been selected
aaronrobertshaw Mar 18, 2022
9829605
Fix RTL handling and style naming
aaronrobertshaw Mar 22, 2022
32e0120
Allow color and style picker to use flyout positioning
aaronrobertshaw Mar 22, 2022
4f538d6
Add multi origin colors to storybook example
aaronrobertshaw Mar 22, 2022
345b49a
Make dropdown header optional via new prop
aaronrobertshaw Mar 22, 2022
be99ab1
Update unit tests for optional color/style dropdown header
aaronrobertshaw Mar 22, 2022
02562bb
Use more concise CSS rule to remove whitespace
aaronrobertshaw Mar 23, 2022
535cd0d
Fix tooltips within color/style dropdown
aaronrobertshaw Mar 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add cx to useMemo deps
  • Loading branch information
aaronrobertshaw committed Mar 15, 2022
commit a7ecb60e301d734885bdc2ed093ab23929d6d64a
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,27 @@ export function useBorderControlDropdown(
const cx = useCx();
const classes = useMemo( () => {
return cx( styles.BorderControlDropdown, className );
}, [ className ] );
}, [ className, cx ] );

const indicatorClassName = useMemo( () => {
return cx( styles.BorderColorIndicator );
}, [] );
}, [ cx ] );

const popoverClassName = useMemo( () => {
return cx( styles.BorderControlPopover );
}, [] );
}, [ cx ] );

const popoverControlsClassName = useMemo( () => {
return cx( styles.BorderControlPopoverControls );
}, [] );
}, [ cx ] );

const popoverContentClassName = useMemo( () => {
return cx( styles.BorderControlPopoverContent );
}, [] );
}, [ cx ] );

const resetButtonClassName = useMemo( () => {
return cx( styles.ResetButton );
}, [] );
}, [ cx ] );

return {
...otherProps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ export function useBorderControlStylePicker(
const cx = useCx();
const classes = useMemo( () => {
return cx( styles.BorderControlStylePicker, className );
}, [ className ] );
}, [ className, cx ] );

const buttonClassName = useMemo( () => {
return cx( styles.BorderStyleButton );
}, [] );
}, [ cx ] );

return { ...otherProps, className: classes, buttonClassName };
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,23 @@ export function useBorderControl(
const cx = useCx();
const classes = useMemo( () => {
return cx( styles.BorderControl, className );
}, [ className ] );
}, [ className, cx ] );

const innerWrapperClassName = useMemo( () => {
const wrapperWidth = isCompact ? '90px' : width;
const widthStyle =
!! wrapperWidth && styles.WrapperWidth( wrapperWidth );

return cx( styles.InnerWrapper, widthStyle );
}, [ isCompact, width ] );
}, [ isCompact, width, cx ] );

const widthControlClassName = useMemo( () => {
return cx( styles.BorderWidthControl );
}, [] );
}, [ cx ] );

const sliderClassName = useMemo( () => {
return cx( styles.BorderSlider );
}, [] );
}, [ cx ] );

return {
...otherProps,
Expand Down