Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

Commit

Permalink
Merge branch 'master' into hotfix/guard
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Mar 17, 2017
2 parents e5b70e2 + 966dc20 commit cba05ab
Show file tree
Hide file tree
Showing 25 changed files with 238 additions and 317 deletions.
8 changes: 1 addition & 7 deletions .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ addDecorator((fn, { kind, story }) => <div>
</div>
</nav>
<div className="uk-margin-top uk-margin-left uk-margin-right uk-margin-bottom">
{/* <a
href={`javascript:
var script = document.createElement('script');
script.setAttribute('src', 'https://getuikit.com/migrate.min.js');
document.body.appendChild(script);
`}>test</a> */}
{fn()}
</div>
</div>)
Expand All @@ -56,7 +50,7 @@ function loadStories() {
require('../src/stories/Button')
require('../src/stories/Dropdown')
require('../src/stories/Modal')
require('../src/stories/Notification')
require('../src/stories/Notify')
require('../src/stories/Input')
}

Expand Down
23 changes: 9 additions & 14 deletions .storybook/uikit.less
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
// uikit deps
@theme: 'gradient';
//@import "~uikit/themes/@{theme}/uikit";
@import "~uikit/themes/@{theme}/uikit";

//@import "~uikit/src/less/components/autocomplete";
@import "~uikit/src/less/uikit.theme.less";
// @import "~uikit/src/less/components/form";
// @import "~uikit/src/less/components/button";
// @import "~uikit/src/less/components/dropdown";
// @import "~uikit/src/less/components/drop";
// @import "~uikit/src/less/components/notification";
//@import "~uikit/dist/less/components/notify";
@import "~uikit/dist/less/components/autocomplete";
@import "~uikit/dist/less/components/form-advanced";
@import "~uikit/dist/less/components/notify";

//@import "~uikit/themes/@{theme}/autocomplete";
//@import "~uikit/src/less/theme/@{theme}/form";
//@import "~uikit/themes/@{theme}/notify";
@import "~uikit/themes/@{theme}/autocomplete";
@import "~uikit/themes/@{theme}/form-advanced";
@import "~uikit/themes/@{theme}/notify";

// uikit-react deps
//@import "../less/select.less";
@import "../less/select.less";

//@icon-font-path: "~uikit/dist/fonts";
@icon-font-path: "~uikit/dist/fonts";

// Storybook specific
.tm-navbar {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,21 @@
"@kadira/react-storybook-addon-info": "3.3.0",
"@kadira/storybook": "2.35.3",
"@kadira/storybook-deployer": "1.2.0",
"autoprefixer": "6.7.5",
"autoprefixer": "6.7.7",
"babel-cli": "6.23.0",
"babel-core": "6.23.1",
"babel-core": "6.24.0",
"babel-eslint": "7.1.1",
"babel-jest": "19.0.0",
"babel-plugin-react-transform": "2.0.2",
"babel-plugin-transform-react-constant-elements": "6.23.0",
"babel-plugin-transform-react-inline-elements": "6.22.0",
"babel-polyfill": "6.23.0",
"babel-preset-es2015": "6.22.0",
"babel-preset-es2015": "6.24.0",
"babel-preset-react": "6.23.0",
"babel-preset-stage-0": "6.22.0",
"babel-register": "6.23.0",
"babel-register": "6.24.0",
"coveralls": "2.12.0",
"css-loader": "0.26.4",
"css-loader": "0.27.3",
"eslint": "3.16.1",
"eslint-config-airbnb": "14.1.0",
"eslint-plugin-import": "2.2.0",
Expand All @@ -78,7 +78,7 @@
"gh-release": "2.2.1",
"growl": "1.9.2",
"jest-cli": "19.0.2",
"jsdom": "9.11.0",
"jsdom": "9.12.0",
"json-loader": "0.5.4",
"less": "2.7.2",
"less-loader": "3.0.0",
Expand All @@ -95,7 +95,7 @@
"semver": "^5.3.0",
"semver-truncate": "^1.1.2",
"style-loader": "0.14.1",
"uikit": "3.0.0-beta.16",
"uikit": "2.27.2",
"url-loader": "0.5.8"
},
"dependencies": {
Expand Down
17 changes: 8 additions & 9 deletions src/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,44 @@ export default class Button extends Component {
danger: PropTypes.bool,
large: PropTypes.bool,
link: PropTypes.bool,
mini: PropTypes.bool,
primary: PropTypes.bool,
secondary: PropTypes.bool,
small: PropTypes.bool,
text: PropTypes.bool,
success: PropTypes.bool,
}

static defaultProps = {
type: 'button',
active: false,
primary: false,
success: false,
danger: false,
link: false,
mini: false,
small: false,
large: false,
className: '',
secondary: false,
text: false,
}

render() {
const {
active,
primary,
success,
danger,
link,
mini,
small,
large,
secondary,
text,
className: customClassName,
...other
} = this.props
const className = cx('uk-button', customClassName, {
'uk-button-default': !primary && !secondary && !danger && !text && !link,
'uk-button-primary': primary,
'uk-button-secondary': secondary,
'uk-button-success': success,
'uk-button-danger': danger,
'uk-button-text': text,
'uk-button-link': link,
'uk-button-mini': mini,
'uk-button-small': small,
'uk-button-large': large,
'uk-active': active,
Expand Down
2 changes: 1 addition & 1 deletion src/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class Dropdown extends Component {
remainTime: 800,
delay: 0,
component: 'div',
className: 'uk-inline',
className: 'uk-button-dropdown',
link: '',
}

Expand Down
5 changes: 3 additions & 2 deletions src/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ const Input = ({
width,
...other
}) => {
const className = cx(`uk-input ${customClassName}`, {
const className = cx(customClassName, {
'uk-form-blank': blank,
'uk-form-danger': danger,
'uk-form-large': large,
'uk-form-small': small,
'uk-form-success': success,
'uk-form-width-large': width === 'large',
'uk-form-width-medium': width === 'medium',
'uk-form-width-mini': width === 'mini',
'uk-form-width-small': width === 'small',
'uk-width-1-1': width === 'full',
})
Expand Down Expand Up @@ -49,7 +50,7 @@ Input.propTypes = {
large: PropTypes.bool,
small: PropTypes.bool,
success: PropTypes.bool,
width: PropTypes.oneOf(['full', 'large', 'medium', 'small', false]),
width: PropTypes.oneOf(['full', 'large', 'medium', 'small', 'mini', false]),
}

Input.defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/Modal/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class Dialog extends Component {
)}
{header && (<div className="uk-modal-header"><h2>{header}</h2></div>)}
{caption && (<div className="uk-modal-caption">{caption}</div>)}
<div className="uk-modal-body">{children}</div>
{children}
{ footer.length > 0 &&
(<div className="uk-modal-footer uk-text-right">
{
Expand Down
6 changes: 1 addition & 5 deletions src/Modal/__tests__/__snapshots__/Dialog-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ exports[`Dialog renders correctly 1`] = `
/>
<div
className="uk-modal-body"
>
Lorem Ipsum
</div>
Lorem Ipsum
</div>
`;
Loading

0 comments on commit cba05ab

Please sign in to comment.