Skip to content
Snippets Groups Projects
Commit ed39197a authored by Liliana Sanfilippo's avatar Liliana Sanfilippo
Browse files

code and error design

parent e4b903bb
No related branches found
No related tags found
No related merge requests found
Pipeline #394949 passed
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* * COLOURS * */ /* * COLOURS * */
/* * * * * * * */ /* * * * * * * */
:root { :root {
/* our colours*/ /* our colours*/
--text-primary: #850F78; --text-primary: #850F78;
--mediumpurple: #bc15aa; --mediumpurple: #bc15aa;
/*--purple: #B85BD1; */ /*--purple: #B85BD1; */
...@@ -65,8 +65,20 @@ a { ...@@ -65,8 +65,20 @@ a {
text-decoration: none !important; text-decoration: none !important;
} }
code{
color:black !important;
}
.codesnippet{
padding-left: 30px;
padding-top: 5px;
padding-bottom: 5px;
border-radius: 10px;
margin-top: 10px;
margin-bottom: 15px !important;
color: var(--text-primary) !important;
background-color: rgb(217, 217, 217);
}
/* * * * * * * */ /* * * * * * * */
/* *SIDEBAR* * */ /* *SIDEBAR* * */
/* * * * * * * */ /* * * * * * * */
...@@ -667,16 +679,44 @@ svg{ ...@@ -667,16 +679,44 @@ svg{
-webkit-text-stroke-width: 3px; -webkit-text-stroke-width: 3px;
-webkit-text-stroke-color: black; -webkit-text-stroke-color: black;
} }
.terminal-box{
.error{ margin-top: 10px;
background-color: lightgray; margin-bottom: 10px;
background-color: black;
border-radius: 10px; border-radius: 10px;
color: black; color: white;
padding-left: 1vw; padding-left: 30px;
padding-right: 1vw; padding-right: 20px;
padding-top: 10px;
padding-bottom: 10px;
} }
.terminal-box .terminal-error{
color: red;
}
.problem-error::before {
background-image: url(https://static.igem.wiki/teams/5247/design/icons/cross-circle.png);
background-size: 20px 20px;
content: "";
background-repeat: no-repeat;
width: 20px;
height: 20px;
padding-right: 30px;
align-self: center;
}
.problem-error{
display: inline-flex;
margin-top: 10px;
margin-bottom: 10px;
background-color: black;
border-radius: 10px;
color: white;
padding-left: 30px;
padding-right: 20px;
padding-top: 10px;
padding-bottom: 10px;
}
/* TIMELINE EINS */ /* TIMELINE EINS */
.timeline-container { .timeline-container {
......
export function Code({children}:{children: React.ReactNode} ){
return(
<div className="codesnippet">
<code>
{children}
</code>
</div>
)
}
\ No newline at end of file
...@@ -167,6 +167,7 @@ function Started(){ ...@@ -167,6 +167,7 @@ function Started(){
import { WikiSelector } from "../components/Filter"; import { WikiSelector } from "../components/Filter";
import { Code } from "./code";
function Troubleshooting(){ function Troubleshooting(){
return( return(
...@@ -228,7 +229,7 @@ function Troubleshooting(){ ...@@ -228,7 +229,7 @@ function Troubleshooting(){
<Collapsible title="Module Z has already exported a member named A. Consider explicitly re-exporting to resolve the ambiguity."> <Collapsible title="Module Z has already exported a member named A. Consider explicitly re-exporting to resolve the ambiguity.">
<h6>Example</h6> <h6>Example</h6>
index.tsx: index.tsx:
<p className="error"> Module "./Bfh.tsx" has already exported a member named 'LabTabs'. Consider explicitly re-exporting to resolve the ambiguity.</p> <p className="problem-error"> Module "./Bfh.tsx" has already exported a member named 'LabTabs'. Consider explicitly re-exporting to resolve the ambiguity.</p>
<h6>Solutions</h6> <h6>Solutions</h6>
Simply rename the function in one of the modules or consider making it a component if you plan on using it frequently. Simply rename the function in one of the modules or consider making it a component if you plan on using it frequently.
</Collapsible> </Collapsible>
...@@ -237,23 +238,23 @@ function Troubleshooting(){ ...@@ -237,23 +238,23 @@ function Troubleshooting(){
<Collapsible title="error TS6133: 'event' is declared but its value is never read."> <Collapsible title="error TS6133: 'event' is declared but its value is never read.">
<h6>Example</h6> <h6>Example</h6>
HorizontalTimeline.tsx: HorizontalTimeline.tsx:
<div className="error"> <div className="terminal-box">
$ yarn build $ yarn build
<p>yarn run v1.22.19</p> <p>yarn run v1.22.19</p>
<p>$ tsc && vite build</p> <p>$ tsc && vite build</p>
<p>src/components/HorizontalTimeline.tsx(67,23): error TS6133: 'event' is declared but its value is never read. <p className="terminal-error">src/components/HorizontalTimeline.tsx(67,23): error TS6133: 'event' is declared but its value is never read.
error Command failed with exit code 2.</p> error Command failed with exit code 2.</p>
<p>info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.</p> <p>info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.</p>
</div> </div>
<p>in</p> <p>in</p>
<code> <Code>
const openPop = (event : React.MouseEvent&lt;HTMLButtonElement, MouseEvent&gt;) =&gt; {} const openPop = (event : React.MouseEvent&lt;HTMLButtonElement, MouseEvent&gt;) =&gt; {}
</code> </Code>
<h6>Solutions</h6> <h6>Solutions</h6>
<p>Change to: </p> <p>Change to: </p>
<code> <Code>
const openPop = (_event : React.MouseEvent&lt;HTMLButtonElement, MouseEvent&gt;) =&gt; {} const openPop = (_event : React.MouseEvent&lt;HTMLButtonElement, MouseEvent&gt;) =&gt; {}
</code> </Code>
</Collapsible> </Collapsible>
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment