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

Typescript definition file for prop types #34

Closed
wants to merge 6 commits into from
Closed
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
5,072 changes: 2,593 additions & 2,479 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
{
"name": "Julian Böhnke",
"email": "[email protected]"
},
{
"name": "Thibault HENRY",
"email": "[email protected]"
}
],
"main": "lib/components",
Expand Down Expand Up @@ -40,6 +44,8 @@
"react-dom": "^16.0.0"
},
"devDependencies": {
"@types/react": "^16.4.7",
"@types/typescript": "^2.0.0",
"babel-cli": "^6.26.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.0",
Expand All @@ -53,16 +59,21 @@
"eslint-plugin-standard": "^3.0.1",
"gh-pages": "^1.0.0",
"react-scripts": "1.0.14",
"react-styleguidist": "^6.0.27"
"react-styleguidist": "^6.0.27",
"scp": "0.0.3",
"tslint": "^5.11.0",
"typescript": "^3.0.1"
},
"scripts": {
"test": "react-scripts test --env=jsdom",
"styleguide": "styleguidist server",
"styleguide:build": "styleguidist build",
"predeploy": "npm run styleguide:build",
"deploy": "gh-pages -d styleguide",
"build": "babel src -d lib",
"lint": "eslint src/components/**; exit 0",
"build": "babel src -d lib && scp ./src/components/index.d.ts ./lib/components/index.d.ts",
"lint:js": "eslint src/components/**/*.js",
"lint:ts": "tslint -c tslint.json 'src/**/*.ts'",
"lint": "npm run lint:js && npm run lint:ts",
"lint:watch": "esw -w src/**",
"prepublish": "npm run build",
"publish": "git push origin && git push origin --tags",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ Button.propTypes = {
static: PropTypes.bool
}

export default Button
export default Button
2 changes: 1 addition & 1 deletion src/components/Card/CardImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ CardImage.propTypes = {
'3by5',
'9by16',
'1by2',
'1by3',
'1by3'
]),
is: PropTypes.oneOf([
'16x16',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Container/Container.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Container = ({
}) => {
const classes = classNames('container', {
'is-fluid': fluid,
'has-text-centered': hasTextCentered,
'has-text-centered': hasTextCentered
}, className)

return <div className={classes} {...props} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/File/File.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ File.propTypes = {
primary: PropTypes.bool,
right: PropTypes.bool,
small: PropTypes.bool,
warning: PropTypes.bool,
warning: PropTypes.bool
}

File.Cta = FileCta
Expand Down
3 changes: 2 additions & 1 deletion src/components/File/FileIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const FileIcon = ({
FileIcon.displayName = 'File.Icon'

FileIcon.propTypes = {
className: PropTypes.string
className: PropTypes.string,
as: PropTypes.string
}

FileIcon.defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/File/FileInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const FileInput = ({
}) => {
const classes = classNames('file-input', className)

return <input className={classes} type="file" {...props} />
return <input className={classes} type='file' {...props} />
}

FileInput.displayName = 'File.Input'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Image/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Image.propTypes = {
'3by5',
'9by16',
'1by2',
'1by3',
'1by3'
]),
is: PropTypes.oneOf([
'16x16',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ Input.defaultProps = {
type: 'text'
}

export default Input
export default Input
Loading