Skip to content

Commit

Permalink
updates css
Browse files Browse the repository at this point in the history
  • Loading branch information
dplumlee committed Feb 7, 2023
1 parent ce349e5 commit c883c2c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ export const BarGroup = styled.div.attrs({
`;
BarGroup.displayName = 'BarGroup';

export const BarText = styled.p.attrs({
className: 'siemUtilityBar__text',
})<{ shouldWrap: boolean }>`
export const BarText = styled.p.attrs(({ className }) => ({
className: className || 'siemUtilityBar__text',
}))<{ shouldWrap: boolean }>`
${({ shouldWrap, theme }) => css`
color: ${theme.eui.euiTextSubduedColor};
font-size: ${theme.eui.euiFontSizeXS};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ export interface UtilityBarTextProps {
children: string | JSX.Element;
dataTestSubj?: string;
shouldWrap?: boolean;
className?: string;
}

export const UtilityBarText = React.memo<UtilityBarTextProps>(
({ children, dataTestSubj, shouldWrap = false }) => (
<BarText data-test-subj={dataTestSubj} shouldWrap={shouldWrap}>
({ children, dataTestSubj, shouldWrap = false, className }) => (
<BarText data-test-subj={dataTestSubj} shouldWrap={shouldWrap} className={className}>
{children}
</BarText>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ const ExceptionsViewerComponent = ({
onChangeExceptionsToShow={handleExceptionsToShow}
lastUpdated={lastUpdated}
/>
<EuiSpacer size="l" />
<EuiSpacer size="m" />
<ExceptionsViewerSearchBar
canAddException={isReadOnly}
isEndpoint={isEndpointSpecified}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ const StyledBarGroup = styled(EuiFlexGroup)`
align-items: center;
`;

const PaginationUtilityBarText = styled(UtilityBarText)`
align-self: center;
`;

interface ExceptionsViewerUtilityProps {
pagination: ExceptionsPagination;
// Corresponds to last time exception items were fetched
Expand All @@ -54,7 +58,7 @@ const ExceptionsViewerUtilityComponent: React.FC<ExceptionsViewerUtilityProps> =
<UtilityBar>
<UtilityBarSection>
<UtilityBarGroup>
<UtilityBarText dataTestSubj="exceptionsShowing">
<PaginationUtilityBarText dataTestSubj="exceptionsShowing">
<FormattedMessage
id="xpack.securitySolution.exceptions.viewer.paginationDetails"
defaultMessage="Showing {partOne} of {partTwo}"
Expand All @@ -68,7 +72,7 @@ const ExceptionsViewerUtilityComponent: React.FC<ExceptionsViewerUtilityProps> =
partTwo: <StyledText>{`${pagination.totalItemCount}`}</StyledText>,
}}
/>
</UtilityBarText>
</PaginationUtilityBarText>
</UtilityBarGroup>
</UtilityBarSection>
<UtilityBarSection>
Expand Down

0 comments on commit c883c2c

Please sign in to comment.