Skip to content

Commit

Permalink
Memoize presentation panel border style strings
Browse files Browse the repository at this point in the history
  • Loading branch information
cqliu1 committed Dec 18, 2024
1 parent 8b6bd86 commit db7251a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ export const PresentationPanelHoverActions = ({

const { euiTheme } = useEuiTheme();

const EDIT_MODE_OUTLINE = `${euiTheme.border.width.thin} dashed ${euiTheme.colors.borderBaseFormsControl}`;
const VIEW_MODE_OUTLINE = euiTheme.border.thin;
const EDIT_MODE_OUTLINE = useMemo(()=> `${euiTheme.border.width.thin} dashed ${euiTheme.colors.borderBaseFormsControl}`,[euiTheme.border.width.thin, euiTheme.colors.borderBaseFormsControl]);
const VIEW_MODE_OUTLINE = useMemo(()=> `${euiTheme.border.width.thin} solid ${euiTheme.colors.borderBasePlain}`,[euiTheme.border.width.thin, euiTheme.colors.borderBasePlain]);

const ALL_ROUNDED_CORNERS = `
border-radius: ${euiTheme.border.radius.medium};
Expand Down

0 comments on commit db7251a

Please sign in to comment.