Skip to content
Merged
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
20 changes: 10 additions & 10 deletions docs/build/bundle.d6a3f6e0.js → docs/build/bundle.10b9dd78.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>react-common</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Rubik:400,700"></head><body><div id="rsg-root"></div><div id="app"></div><script src="build/bundle.d6a3f6e0.js"></script></body></html>
<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>react-common</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Rubik:400,700"></head><body><div id="rsg-root"></div><div id="app"></div><script src="build/bundle.10b9dd78.js"></script></body></html>
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wikia/react-common",
"version": "7.0.4",
"version": "7.1.0-test",
"description": "Wikia's reusable React parts",
"repository": "git@github.com:Wikia/react-common.git",
"license": "UNLICENSED",
Expand Down Expand Up @@ -38,7 +38,7 @@
"classnames": "^2.2.6",
"date-fns": "^1.29.0",
"deepmerge": "^3.2.0",
"design-system": "git://github.com/Wikia/design-system.git#20.0.0",
"design-system": "git://github.com/Wikia/design-system.git#21.0.0",
"i18next": "^14.0.1",
"immutable": "^4.0.0-rc.12",
"prop-types": "^15.6.2",
Expand Down
2 changes: 1 addition & 1 deletion source/components/Avatar/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
@import "~design-system/dist/scss/wds-variables/index.scss";
@import "~design-system/dist/scss/wds-components/_avatar.scss";
.wds-avatar {
@include wds-avatar(48px, $wds-fandom-color-middle-gray, $wds-fandom-color-middle-gray);
@include wds-avatar(48px, $wds-fandom-color-mid-light-gray, $wds-fandom-color-mid-light-gray);
}
2 changes: 2 additions & 0 deletions source/components/Button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Different styles:
<div>
<Button href='#'>Link</Button>
<Button secondary>Secondary</Button>
<Button secondary light>Secondary light</Button>
<Button text>Text</Button>
<Button text light>Text light</Button>
<Button square>&hellip;</Button>
</div>
```
Expand Down
24 changes: 22 additions & 2 deletions source/components/Button/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ exports[`Button renders correctly with custom types values 2`] = `
`;

exports[`Button renders correctly with custom types values 3`] = `
<button
className="wds-button wds-is-secondary wds-is-light"
disabled={false}
onClick={[Function]}
>
secondary light
</button>
`;

exports[`Button renders correctly with custom types values 4`] = `
<button
className="wds-button wds-is-text"
disabled={false}
Expand All @@ -74,7 +84,17 @@ exports[`Button renders correctly with custom types values 3`] = `
</button>
`;

exports[`Button renders correctly with custom types values 4`] = `
exports[`Button renders correctly with custom types values 5`] = `
<button
className="wds-button wds-is-light wds-is-text"
disabled={false}
onClick={[Function]}
>
text light
</button>
`;

exports[`Button renders correctly with custom types values 6`] = `
<button
className="wds-button wds-is-square"
disabled={false}
Expand All @@ -84,7 +104,7 @@ exports[`Button renders correctly with custom types values 4`] = `
</button>
`;

exports[`Button renders correctly with custom types values 5`] = `
exports[`Button renders correctly with custom types values 7`] = `
<button
className="wds-button custom-class"
disabled={false}
Expand Down
5 changes: 5 additions & 0 deletions source/components/Button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const Button = ({
text,
secondary,
square,
light,
fullwidth,
children,
...rest
Expand All @@ -20,6 +21,7 @@ const Button = ({
className,
secondary ? 'wds-is-secondary' : '',
square ? 'wds-is-square' : '',
light ? 'wds-is-light' : '',
text ? 'wds-is-text' : '',
fullwidth ? 'wds-is-fullwidth' : '',
].filter(c => c).join(' ');
Expand All @@ -42,6 +44,8 @@ Button.propTypes = {
fullwidth: PropTypes.bool,
/** href attribute - `<Button/>` uses `<a>` tag if it's present */
href: PropTypes.string,
/** Light flag */
light: PropTypes.bool,
/** Callback for the `<button>` */
onClick: PropTypes.func,
/** Secondary flag */
Expand All @@ -58,6 +62,7 @@ Button.defaultProps = {
disabled: false,
fullwidth: false,
href: null,
light: false,
secondary: false,
square: false,
text: false,
Expand Down
10 changes: 10 additions & 0 deletions source/components/Button/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,21 @@ test('Button renders correctly with custom types values', () => {
);
expect(component.toJSON()).toMatchSnapshot();

component = renderer.create(
<Button secondary light>secondary light</Button>,
);
expect(component.toJSON()).toMatchSnapshot();

component = renderer.create(
<Button text>text</Button>,
);
expect(component.toJSON()).toMatchSnapshot();

component = renderer.create(
<Button text light>text light</Button>,
);
expect(component.toJSON()).toMatchSnapshot();

component = renderer.create(
<Button square>&hellip;</Button>,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ exports[`render GlobalNavigation renders correctly 1`] = `
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand Down Expand Up @@ -678,6 +679,7 @@ exports[`render GlobalNavigation renders correctly when user or partnerSlot are
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`LinkButton renders correctly 1`] = `
disabled={false}
fullwidth={false}
href="//www.wikia.com/Special:CreateNewWiki"
light={false}
onClick={[Function]}
secondary={true}
square={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ exports[`render Search renders correctly with default props 1`] = `
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand All @@ -84,6 +85,7 @@ exports[`render Search renders correctly with default props 1`] = `
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand All @@ -103,6 +105,7 @@ exports[`render Search renders correctly with default props 1`] = `
disabled={true}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand Down Expand Up @@ -191,6 +194,7 @@ exports[`render Search renders correctly with suggestions and query 1`] = `
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand All @@ -209,6 +213,7 @@ exports[`render Search renders correctly with suggestions and query 1`] = `
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand All @@ -228,6 +233,7 @@ exports[`render Search renders correctly with suggestions and query 1`] = `
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`SearchModal renders correctly when isOpen is false 1`] = `
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand All @@ -29,6 +30,7 @@ exports[`SearchModal renders correctly when isOpen is true 1`] = `
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`MobileAnon renders correctly 1`] = `
disabled={false}
fullwidth={false}
href="https://www.wikia.com/signin + redirectto"
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`MobileLoggedIn renders correctly with isOpen passed as true 1`] = `
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand Down Expand Up @@ -91,6 +92,7 @@ exports[`MobileLoggedIn renders correctly with over 99 notifications in counter
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand Down Expand Up @@ -175,6 +177,7 @@ exports[`MobileLoggedIn renders correctly with unread counter 1`] = `
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand Down Expand Up @@ -259,6 +262,7 @@ exports[`MobileLoggedIn renders correctly without unread counter 1`] = `
disabled={false}
fullwidth={false}
href={null}
light={false}
onClick={[Function]}
secondary={false}
square={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ exports[`UserAnon renders correctly 1`] = `
disabled={false}
fullwidth={true}
href="https://www.wikia.com/signin + redirectto"
light={false}
onClick={[Function]}
rel="nofollow"
secondary={false}
Expand All @@ -58,6 +59,7 @@ exports[`UserAnon renders correctly 1`] = `
disabled={false}
fullwidth={true}
href="https://www.wikia.com/register + register-param"
light={false}
onClick={[Function]}
rel="nofollow"
secondary={true}
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4253,9 +4253,9 @@ des.js@^1.0.0:
inherits "^2.0.1"
minimalistic-assert "^1.0.0"

"design-system@git://github.com/Wikia/design-system.git#20.0.0":
version "20.0.0"
resolved "git://github.com/Wikia/design-system.git#6f31899b5bd7ab427ffe9fa10682b93e1e63bec7"
"design-system@git://github.com/Wikia/design-system.git#21.0.0":
version "21.0.0"
resolved "git://github.com/Wikia/design-system.git#5287216d36731b180adc8c6cccc6392a6f9e4d65"
dependencies:
ember-autoresize "1.3.2"
ember-cli-babel "7.2.0"
Expand Down