Skip to content

Commit dad49b1

Browse files
committed
fix carets
1 parent a8d1559 commit dad49b1

3 files changed

Lines changed: 6 additions & 43 deletions

File tree

packages/module/src/Message/Message.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { DeepThinkingProps } from '../DeepThinking';
1111

1212
// Mock the icon components
1313
jest.mock('@patternfly/react-icons', () => ({
14+
...jest.requireActual('@patternfly/react-icons'),
1415
RhUiLikeIcon: () => <div>RhUiLikeIcon</div>,
1516
RhUiLikeFillIcon: () => <div>RhUiLikeFillIcon</div>,
1617
RhUiDislikeIcon: () => <div>RhUiDislikeIcon</div>,

packages/module/src/SourcesCard/SourcesCard.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,25 +79,12 @@
7979
justify-content: space-between;
8080
flex: 1;
8181

82-
.pf-v6-c-button {
83-
border-radius: var(--pf-t--global--border--radius--pill);
84-
padding: var(--pf-t--global--spacer--sm);
85-
width: 2.31rem;
86-
height: 2.31rem;
87-
display: flex;
88-
align-items: center;
89-
justify-content: center;
90-
}
9182
button:disabled,
9283
button[disabled] {
9384
.pf-v6-c-icon__content {
9485
color: var(--pf-t--global--icon--color--disabled);
9586
}
9687
}
97-
.pf-v6-c-button__text {
98-
display: flex;
99-
align-items: center;
100-
}
10188
// Interactive states
10289
.pf-v6-c-button:hover,
10390
.pf-v6-c-button:focus {

packages/module/src/SourcesCardBase/SourcesCardBase.tsx

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ import {
2323
CardTitleProps,
2424
ExpandableSection,
2525
ExpandableSectionVariant,
26-
Icon,
2726
Truncate,
2827
TruncateProps
2928
} from '@patternfly/react-core';
30-
import { RhMicronsExternalLinkIcon } from '@patternfly/react-icons';
29+
import { RhMicronsCaretLeftIcon, RhMicronsCaretRightIcon, RhMicronsExternalLinkIcon } from '@patternfly/react-icons';
3130

3231
export interface SourcesCardBaseProps extends CardProps {
3332
/** Additional classes for the pagination navigation container. */
@@ -254,6 +253,7 @@ const SourcesCardBase: FunctionComponent<SourcesCardBaseProps> = ({
254253
>
255254
<Button
256255
variant={ButtonVariant.plain}
256+
isCircle
257257
isDisabled={isDisabled || page === 1}
258258
data-action="previous"
259259
onClick={(event) => {
@@ -263,26 +263,14 @@ const SourcesCardBase: FunctionComponent<SourcesCardBaseProps> = ({
263263
}}
264264
aria-label={toPreviousPageAriaLabel}
265265
>
266-
<Icon iconSize="lg">
267-
{/* these are inline because the viewBox that works in a round icon is different than the PatternFly default */}
268-
<svg
269-
className="pf-v6-svg"
270-
viewBox="0 0 280 500"
271-
fill="currentColor"
272-
aria-hidden="true"
273-
role="img"
274-
width="1em"
275-
height="1em"
276-
>
277-
<path d="M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"></path>
278-
</svg>
279-
</Icon>
266+
<RhMicronsCaretLeftIcon />
280267
</Button>
281268
<span aria-hidden="true">
282269
{page}/{sources.length}
283270
</span>
284271
<Button
285272
variant={ButtonVariant.plain}
273+
isCircle
286274
isDisabled={isDisabled || page === sources.length}
287275
aria-label={toNextPageAriaLabel}
288276
data-action="next"
@@ -292,20 +280,7 @@ const SourcesCardBase: FunctionComponent<SourcesCardBaseProps> = ({
292280
handleNewPage(event, newPage);
293281
}}
294282
>
295-
<Icon isInline iconSize="lg">
296-
{/* these are inline because the viewBox that works in a round icon is different than the PatternFly default */}
297-
<svg
298-
className="pf-v6-svg"
299-
viewBox="0 0 180 500"
300-
fill="currentColor"
301-
aria-hidden="true"
302-
role="img"
303-
width="1em"
304-
height="1em"
305-
>
306-
<path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"></path>
307-
</svg>
308-
</Icon>
283+
<RhMicronsCaretRightIcon />
309284
</Button>
310285
</nav>
311286
</div>

0 commit comments

Comments
 (0)