Silence prop warnings in test suite
This commit is contained in:
parent
dcc90bc99a
commit
827bca3fd6
8 changed files with 10 additions and 12 deletions
BIN
app/soapbox/components/__mocks__/react-inlinesvg.js
vendored
BIN
app/soapbox/components/__mocks__/react-inlinesvg.js
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -8,18 +8,16 @@ interface IIcon {
|
|||
src: string,
|
||||
}
|
||||
|
||||
const Icon = ({ src, alt, count, ...filteredProps }: IIcon): JSX.Element => {
|
||||
return (
|
||||
<div className='relative'>
|
||||
{count ? (
|
||||
<span className='absolute -top-2 -right-3 block px-1.5 py-0.5 bg-accent-500 text-xs text-white rounded-full ring-2 ring-white'>
|
||||
{count}
|
||||
</span>
|
||||
) : null}
|
||||
const Icon = ({ src, alt, count, ...filteredProps }: IIcon): JSX.Element => (
|
||||
<div className='relative'>
|
||||
{count ? (
|
||||
<span className='absolute -top-2 -right-3 block px-1.5 py-0.5 bg-accent-500 text-xs text-white rounded-full ring-2 ring-white'>
|
||||
{count}
|
||||
</span>
|
||||
) : null}
|
||||
|
||||
<InlineSVG src={src} title={alt} {...filteredProps} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
<InlineSVG src={src} title={alt} {...filteredProps} />
|
||||
</div>
|
||||
);
|
||||
|
||||
export default Icon;
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
jest.config.js
BIN
jest.config.js
Binary file not shown.
Loading…
Reference in a new issue