-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add reset from clicking at navbar title
- Loading branch information
1 parent
8f50d5c
commit 49b7b8c
Showing
9 changed files
with
117 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,7 @@ h4 { | |
.link { | ||
color: white; | ||
text-decoration: none; | ||
cursor: pointer; | ||
} | ||
|
||
.italic { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from "react"; | ||
import { capitalizeFirstLetter } from "../utils"; | ||
|
||
function ResetWarning({ message, onReset, onCancel }) { | ||
return ( | ||
<div className="wrapper"> | ||
<div className="text-container" style={{ justifyContent: "center" }}> | ||
<h4> | ||
{message | ||
? capitalizeFirstLetter(message) | ||
: capitalizeFirstLetter("this")}{" "} | ||
will restart the discussion | ||
</h4> | ||
<div> | ||
<button | ||
className="outline-button" | ||
onClick={onReset} | ||
style={{ marginRight: "9px" }} | ||
> | ||
I understand | ||
</button> | ||
<button | ||
className="outline-button" | ||
onClick={onCancel} | ||
style={{ marginLeft: "9px" }} | ||
> | ||
Cancel | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default ResetWarning; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from "react"; | ||
|
||
function TextOutput() { | ||
const textOutputStyle = { | ||
fontFamily: "Arial, sans-serif", | ||
}; | ||
|
||
return ( | ||
<div> | ||
<h2 style={textOutputStyle}> | ||
Lorem ipsum dolor sit. | ||
<br /> | ||
Lorem ipsum dolor sit amet. | ||
</h2> | ||
</div> | ||
); | ||
} | ||
|
||
export default TextOutput; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
export function capitalizeFirstLetter(string) { | ||
return string.charAt(0).toUpperCase() + string.slice(1); | ||
if (string && typeof string === "string") { | ||
return string.charAt(0).toUpperCase() + string.slice(1); | ||
} | ||
|
||
return string || ""; | ||
} |