Skip to content

Commit

Permalink
Added role to icon. Added optional chaining to ndla-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarvelle committed Mar 11, 2021
1 parent def0bfd commit 30293be
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 15 deletions.
1 change: 0 additions & 1 deletion packages/carousel/src/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import React, { Component } from 'react';
// @ts-ignore
import { ChevronRight, ChevronLeft } from '@ndla/icons/common';
import { Swipeable, EventData } from 'react-swipeable';
import { slideWrapperCSS, StyledButton, StyledSlideContent } from './Styles';
Expand Down
3 changes: 3 additions & 0 deletions packages/ndla-icons/src/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ export interface Props {
width?: string;
height?: string;
viewBox?: string;
role?: string;
style?: {}; // eslint-disable-line
}
const IconBase = ({
children,
color,
size,
style,
role,
title,
description,
width,
Expand All @@ -34,6 +36,7 @@ const IconBase = ({
height={height || computedSize}
width={width || computedSize}
className={classes}
role={role}
{...props}
style={{
verticalAlign: 'middle',
Expand Down
12 changes: 0 additions & 12 deletions packages/ndla-licenses/src/LicenseByline/LicenseDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import React, { FC } from 'react';
import PropTypes from 'prop-types';
import { colors, spacing } from '@ndla/core';
import styled from '@emotion/styled';
import LicenseIconDescriptionList from './LicenseIconDescriptionList';
Expand Down Expand Up @@ -61,15 +60,4 @@ const LicenseDescription: FC<Props> = ({
</StyledLicenseByline>
);

LicenseDescription.propTypes = {
children: PropTypes.node,
licenseRights: PropTypes.arrayOf(PropTypes.string.isRequired).isRequired,
messages: PropTypes.shape({
modelPremission: PropTypes.string,
}),
highlightCC: PropTypes.bool,
color: PropTypes.string,
locale: PropTypes.string,
};

export default LicenseDescription;
1 change: 1 addition & 0 deletions packages/ndla-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"react": "^16.8.4"
},
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
"@types/reach__dialog": "^0.1.0",
"css-loader": "^2.1.0",
"enzyme": "^3.8.0",
Expand Down
1 change: 0 additions & 1 deletion packages/ndla-ui/src/AudioPlayer/Controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
SliderHandle,
SliderOrientation,
} from '@reach/slider';
// @ts-ignore
import { Play, Pause } from '@ndla/icons/common';
import { breakpoints, colors, fonts, misc, mq, spacing } from '@ndla/core';
import { injectT, tType } from '@ndla/i18n';
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"baseUrl": ".",
"target": "esnext",
"target": "es5",
"esModuleInterop": true,
"jsx": "react",
// isolatedModules and declaration are not allowed together at
Expand Down

0 comments on commit 30293be

Please sign in to comment.