Skip to content

Commit

Permalink
Add default value for style if/when undefined.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed May 14, 2021
1 parent 1bab4c8 commit e22c3df
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ const StyledButton = styled(EuiButtonEmpty)`
}
`;

const DEFAULT_MAX_WIDTH = 275;

const StyledTooltip = euiStyled(EuiToolTip)`
max-width: ${({ theme }) => parseInt(theme.eui.euiBreakpoints.s, 10) - 5}px;
max-width: ${({ theme }) =>
parseInt(theme.eui?.euiBreakpoints?.s ?? DEFAULT_MAX_WIDTH, 10) - 5}px;
`; // prevent wrapping unless URL is longer than our min responsive breakpoint

export const getChunks = (text: string = '') => {
Expand Down

0 comments on commit e22c3df

Please sign in to comment.