Skip to content

Commit

Permalink
Merge pull request #58 from sebgroup/develop
Browse files Browse the repository at this point in the history
minor bug fixes
  • Loading branch information
yousifalraheem authored Oct 8, 2019
2 parents 34f1453 + 777ca55 commit da136dc
Show file tree
Hide file tree
Showing 72 changed files with 648 additions and 561 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ git:
depth: 3

after_success:
- npm run coveralls
- if [ "$TRAVIS_BRANCH" == "master" ];
then npm run travis-deploy-once "npm run semantic-release";
fi
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Build Status](https://travis-ci.com/sebgroup/react-components.svg?branch=master)](https://travis-ci.com/sebgroup/react-components)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Coverage Status](https://coveralls.io/repos/github/sebgroup/react-components/badge.svg?branch=master)](https://coveralls.io/github/sebgroup/react-components?branch=master)

This is a set of react components some of which are based on SEB's bootstrap. The plan for this project is to increase and improve components for future usage.

Expand Down
4 changes: 2 additions & 2 deletions develop/components/pages/TextAreaPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const TextAreaPage: React.FunctionComponent = () => {
<TextArea
name="textArea"
label="Textarea label"
placeHolder="Text Area PlaceHolder"
placeholder="Text Area PlaceHolder"
value={textBoxValue}
cols={30}
rows={5}
Expand All @@ -36,7 +36,7 @@ const TextAreaPage: React.FunctionComponent = () => {
<div className="result">
<TextArea
name="textInput"
placeHolder="Text Area PlaceHolder"
placeholder="Text Area PlaceHolder"
error="error msg will be shown here"
cols={30}
rows={5}
Expand Down
15 changes: 15 additions & 0 deletions develop/components/pages/TextLabelPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import * as React from "react";
import { TextLabel } from "../../../src/TextLabel/TextLabel";
import { Tooltip } from "../../../src/Tooltip/Tooltip";
import { TextBox } from "../../../src/TextBox/TextBox";
const Highlight = (require("react-highlight")).default;
const docMD: string = require("../../../src/TextLabel/readme.md");

Expand All @@ -24,6 +26,19 @@ const TextLabelPage: React.FunctionComponent = () => {
/>
</div>

<p>An example with passing ReactNode as the value (tooltip):</p>
<div className="result">
<TextLabel
value={
<>
400,000 kr
<Tooltip className="ml-1" position="top-right" />
</>
}
label="Current savings"
/>
</div>

</div>

</div>
Expand Down
11 changes: 9 additions & 2 deletions develop/components/pages/TooltipPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ const moneySVG: JSX.Element = <svg xmlns="http://www.w3.org/2000/svg" viewBox="0
const TooltipPage: React.FunctionComponent = () => {
let myTooltip: Tooltip;

function dismissTooltip(e?: React.MouseEvent<HTMLDivElement>): void {
const dismissableTooltip: HTMLElement = document.getElementById("dismissable-tooltip");
if (event.target !== dismissableTooltip.firstChild) {
myTooltip.forceDismiss(e);
}
}

return (
<div className="route-template container" onClick={(e?: React.MouseEvent<HTMLDivElement>) => myTooltip.forceDismiss(e)}>
<div className="route-template container" onClick={dismissTooltip}>
<div className="info-holder">

<div className="info">
Expand All @@ -26,7 +33,6 @@ const TooltipPage: React.FunctionComponent = () => {
message="Tooltip message could be long, therefore, controlling the position and width is important"
position="right"
width={200}
ref={(el: Tooltip) => { myTooltip = el; }}
/>
</div>

Expand All @@ -37,6 +43,7 @@ const TooltipPage: React.FunctionComponent = () => {
position="right"
width={200}
customSvg={moneySVG}
id="dismissable-tooltip"
ref={(el: Tooltip) => { myTooltip = el; }}
/>
</div>
Expand Down
35 changes: 25 additions & 10 deletions docs/app.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/contentindex.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@
},
{
"filename": "readme.md",
"filepath": "/../src/DropDown/readme.md",
"shortpath": "/../src/DropDown/readme",
"longpath": "/../src/DropDown/readme.md",
"filepath": "/../src/Dropdown/readme.md",
"shortpath": "/../src/Dropdown/readme",
"longpath": "/../src/Dropdown/readme.md",
"type": "file",
"title": "Dropdown",
"componentid": "component-dropdown",
Expand Down
2 changes: 1 addition & 1 deletion docs/js/0.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/js/1.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/10.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/11.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit da136dc

Please sign in to comment.