Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/eslint/props-warnings-and-bump-eslint-plugin-to-8.3 #597

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
"@types/enzyme": "^3.10.8",
"@types/jest": "^26.0.23",
"@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^4.28.3",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^4.28.3",
"autoprefixer": "^7.2.4",
"babel-core": "^7.0.0-bridge.0",
Expand Down
10 changes: 5 additions & 5 deletions src/components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import ButtonSimple from '../ButtonSimple';

const Accordion: FC<Props> = forwardRef<HTMLButtonElement, Props>((props, providedRef) => {
const {
ariaLevel,
buttonProps,
children,
className,
id,
style,
defaultExpanded = DEFAULTS.DEFAULT_EXPANDED,
heading,
headingRightContent,
defaultExpanded = DEFAULTS.DEFAULT_EXPANDED,
ariaLevel,
buttonProps,
id,
style,
} = props;

const [expanded, setExpanded] = useState(defaultExpanded);
Expand Down
61 changes: 16 additions & 45 deletions src/components/AriaGroup/AriaGroup.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { FC } from 'react';
import { DocumentationPage } from '../../storybook/helper.stories.docs';
import StyleDocs from '../../storybook/docs.stories.style.mdx';

Expand All @@ -20,7 +20,7 @@ export default {
},
};

const AriaGroupOfTextInput = () => {
const AriaGroupOfTextInput: FC = () => {
const children = (
<div
style={{
Expand All @@ -30,7 +30,7 @@ const AriaGroupOfTextInput = () => {
flexDirection: 'column',
}}
>
<Text id='text-input-group-head'>{'Please enter your information'}</Text>
<Text id="text-input-group-head">{'Please enter your information'}</Text>
<TextInput
aria-label={'first name'}
label={'First Name'}
Expand All @@ -52,15 +52,10 @@ const AriaGroupOfTextInput = () => {
</div>
);

return (
<AriaGroup
ariaLabelledby='text-input-group-head'
children={children}
/>
);
return <AriaGroup ariaLabelledby="text-input-group-head" children={children} />;
};

const AriaGroupOfCheckbox = () => {
const AriaGroupOfCheckbox: FC = () => {
const children = (
<div
style={{
Expand All @@ -70,29 +65,17 @@ const AriaGroupOfCheckbox = () => {
flexDirection: 'column',
}}
>
<Text id='checkbox-group-head'>{'Counties you have visited'}</Text>
<Checkbox
label={'United States of America'}
/>
<Checkbox
label={'United Kingdom'}
/>
<Checkbox
label={'France'}
/>
<Text id="checkbox-group-head">{'Counties you have visited'}</Text>
<Checkbox label={'United States of America'} />
<Checkbox label={'United Kingdom'} />
<Checkbox label={'France'} />
</div>
);

return (

<AriaGroup
ariaLabelledby='checkbox-group-head'
children={children}
/>
);
return <AriaGroup ariaLabelledby="checkbox-group-head" children={children} />;
};

const AriaGroupOfToggles = () => {
const AriaGroupOfToggles: FC = () => {
const children = (
<div
style={{
Expand All @@ -103,25 +86,13 @@ const AriaGroupOfToggles = () => {
}}
>
<Text id="other-options-group-head">{'Other options'}</Text>
<Toggle
aria-label={'Option A'}
/>
<Toggle
aria-label={'Option B'}
/>
<Toggle
aria-label={'Option C'}
/>
<Toggle aria-label={'Option A'} />
<Toggle aria-label={'Option B'} />
<Toggle aria-label={'Option C'} />
</div>
);

return (

<AriaGroup
ariaLabelledby='other-options-group-head'
children={children}
/>
);
return <AriaGroup ariaLabelledby="other-options-group-head" children={children} />;
};

export { AriaGroupOfTextInput, AriaGroupOfCheckbox, AriaGroupOfToggles};
export { AriaGroupOfTextInput, AriaGroupOfCheckbox, AriaGroupOfToggles };
Loading
Loading