Skip to content

Commit

Permalink
Merge pull request #931 from newscorp-ghfb/feat/930-extend-toNewsKitI…
Browse files Browse the repository at this point in the history
…con-types

feat/930-extend-toNewsKitIcon-types
  • Loading branch information
KayKostadinov authored Jun 21, 2024
2 parents 5f3abcd + 7dbf209 commit 5f41952
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions scripts/generate-a11y-tests-comps.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ const testsConfig = files
disabledRules = disabledRulesObj.value.elements.map(node => node.value);
}

if (title === 'cardcomposable') {
disabledRules.push('duplicate-id-aria');
disabledRules.push('duplicate-id-active');
}

return {title, disabledRules};
} catch (e) {
// eslint-disable-next-line no-console
Expand Down
5 changes: 3 additions & 2 deletions src/icons/to-newskit-icon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {EmotionIconProps} from '@emotion-icons/emotion-icon';
import {EmotionIconProps, EmotionIcon} from '@emotion-icons/emotion-icon';
import {withTheme} from '../theme';
import {NewsKitIconProps, NewsKitIcon, SvgProps} from './types';
import {getSizingCssFromTheme, getStylePreset, styled} from '../utils/style';
Expand Down Expand Up @@ -55,7 +55,8 @@ const StyledIcon = styled.svg<NewsKitIconProps>`
export const toNewsKitIcon = (
PassedIcon:
| React.ComponentType<EmotionIconProps>
| React.ComponentType<SvgProps>,
| React.ComponentType<SvgProps>
| EmotionIcon,
): NewsKitIcon =>
withOwnTheme(
withTheme<NewsKitIconProps>(
Expand Down
2 changes: 1 addition & 1 deletion src/image/__tests__/image-e2e.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const StoryE2eTest = () => (
<ImageContainer>
<p>Scroll down</p>
<Image
src="https://placekitten.com/400/400"
src="https://picsum.photos/400/400"
overrides={{width: '400px', height: '400px'}}
loadingAspectRatio="1:1"
loading="lazy"
Expand Down

0 comments on commit 5f41952

Please sign in to comment.