Skip to content

Commit

Permalink
[patch] clean up example
Browse files Browse the repository at this point in the history
  • Loading branch information
camjc committed Sep 29, 2019
1 parent b957708 commit 23f3ef0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
18 changes: 12 additions & 6 deletions demo/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@ import { render } from "react-dom";

import Example from "../../src";

const exampleText =
"That's what it said on 'Ask Jeeves'. Now, when you do this without getting punched in the chest, you'll have more fun. Not tricks, Michael, illusions. I care deeply for nature. Marry me. Michael!";
class Demo extends Component {
render() {
return (
<div>
<h1>
underline-emphasis Demo{" "}
{"That's what it said on 'Ask Jeeves.' Now, when you do this without getting punched in the chest, you'll have more fun. Not tricks, Michael, illusions. I care deeply for nature. Marry me. Michael!"
.split(" ")
.map(word => (
<Fragment key={word}><Example >{word}</Example>{' '}</Fragment>)
)}
underline-emphasis Demo
<br />
{exampleText
.split(".")
.map(partialText => (
<Fragment key={partialText}>
<Example>{partialText + '.'}</Example>
<br />
</Fragment>
))}
</h1>
</div>
);
Expand Down
5 changes: 2 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ const UnderlineEmphasis = ({ children }) => {
});

const pointCount = 5 + Math.floor(normalisedPointCountArray[0]);
console.log(pointCount);


const xArray = getArrayByFunction({
getArrayValue: lcGenerator,
Expand Down Expand Up @@ -143,8 +141,9 @@ const UnderlineEmphasis = ({ children }) => {
backgroundRepeat: "no-repeat",
backgroundSize: "100% auto",
display: "inline",
fontStyle: "inherit",
overflow: "visible",
whiteSpace: "nowrap",
overflow: "visible"
};

return (
Expand Down

0 comments on commit 23f3ef0

Please sign in to comment.