Add typings for @storybook/addon-a11y (#23210)

This commit is contained in:
HyunSeob
2018-01-26 09:07:34 -08:00
committed by Andy
parent 7470a4310e
commit 0514c038e2
4 changed files with 53 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
// Type definitions for @storybook/addon-a11y 3.3
// Project: https://github.com/storybooks/storybook
// Definitions by: HyunSeob <https://github.com/hyunseob>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
import { StoryDecorator } from '@storybook/react';
export const checkA11y: StoryDecorator;
@@ -0,0 +1,11 @@
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import { checkA11y } from '@storybook/addon-a11y';
storiesOf('button', module)
.addDecorator(checkA11y)
.add('Accessible', () => (
<button>
Accessible button
</button>
));
+32
View File
@@ -0,0 +1,32 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"jsx": "react",
"typeRoots": [
"../"
],
"paths": {
"@storybook/addon-a11y": [
"storybook__addon-a11y"
],
"@storybook/react": [
"storybook__react"
]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"storybook__addon-a11y-tests.tsx"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }