Skip to content

Commit

Permalink
Style: sample data button and return input button (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
raipen authored Apr 2, 2023
1 parent 969d1e9 commit 8bdc14b
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 43 deletions.
2 changes: 1 addition & 1 deletion summe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
"last 1 safari version"
]
},
"proxy": "http://192.168.35.200:8080/"
"proxy": "http://localhost:8080/"
}
27 changes: 14 additions & 13 deletions summe/src/component/InputLink.css
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
.inputWrapper{
width: 100%;
max-width: 1200px;
min-width: 300px;
display: flex;
margin: auto;
}

.inputLink {
width: 30%;
margin: 3px 10px;
background-color: transparent;
height: 30px;
width: calc(50% - 4px);
max-width: 800px;
min-width: 50px;
border: 2px solid rgba(0, 0, 0, 0.23);
border-radius: 7px;
flex-grow: 1;
}

.inputLink:hover {
box-shadow: 1px 1px 3px #b0bec5; /* 그림자 효과 */
}

.selected {
.typeButton.selected {
background-color: #cfd8dc;
width: 60px;
height: 30px;
border-radius: 7px;
margin: 2px;
border: 1px solid #b0bec5;
}

.selected:hover {
.typeButton.selected:hover {
box-shadow: 1px 1px 3px #607d8b; /* 그림자 효과 */
}

.notselected {
.typeButton {
/* background-color: #eceff1; */
background-color: white;
width: 60px;
height: 30px;
border-radius: 7px;
margin: 2px;
flex-grow: 0;
border: 1px solid #b0bec5;
}

.notselected:hover {
.typeButton:hover {
box-shadow: 1px 1px 3px #b0bec5; /* 그림자 효과 */
}
4 changes: 2 additions & 2 deletions summe/src/component/InputLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function InputLink({ input, setInput}) {
let urlTypes = ["github", "tistory", "velog", "notion"];

return (
<div>
<div className="inputWrapper">
<input
className="inputLink"
type="text"
Expand All @@ -26,7 +26,7 @@ export default function InputLink({ input, setInput}) {
f.preventDefault();
setInput({...input, type: e});
}}
className={input.type === e ? "selected" : "notselected"}
className={input.type === e ? "selected typeButton" : "typeButton"}
>
{e.charAt(0).toUpperCase() + e.slice(1)}
</button>
Expand Down
17 changes: 4 additions & 13 deletions summe/src/component/button/Button.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
box-shadow: 1px 1px 3px #b0bec5; /* 그림자 효과 */
}

.viewGraphButton {
.viewGraphButton,.returnInputButton {
/* background-color: #eceff1; */
background-color: white;
color: #78909c;
Expand All @@ -37,33 +37,24 @@
margin: 2px;
/* box-shadow: 1px 1px; 그림자 효과 */
border: 1px solid #b0bec5;
margin: auto;
margin-top: 5px;
margin-bottom: 5px;
margin: 5px auto 50px auto;
}

.viewGraphButton:hover {
.viewGraphButton:hover,.returnInputButton:hover {
box-shadow: 1px 1px 3px #b0bec5; /* 그림자 효과 */
}

.sampleData {
/* background-color: #eceff1; */
background-color: white;

display: flex;
justify-content: center;
align-items: center;

line-height: 30px;
width: 100px;
height: 20px;
border-radius: 7px;
margin: 2px;
/* box-shadow: 1px 1px; 그림자 효과 */
border: 1px solid #b0bec5;
margin-left: 13%;
margin-top: 5px;
margin-bottom: 5px;
margin: 5px 0 5px 10px;
}
.sampleData:hover {
box-shadow: 1px 1px 3px #b0bec5; /* 그림자 효과 */
Expand Down
3 changes: 2 additions & 1 deletion summe/src/component/button/Return2InputButton.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import "./Button.css";
export default function Return2InputButton({ setIsGraph }) {
const handleClick = () => {
setIsGraph(false);
};

return (
<>
<button onClick={handleClick}>Return To Input</button>
<button className="returnInputButton" onClick={handleClick}>Return To Input</button>
</>
);
}
28 changes: 15 additions & 13 deletions summe/src/page/main/Main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,21 @@ export default function Main() {
<div style={{ textAlign: "center" }}>
<SummeLogo />

<SampleData setInput={setInput} />
{input.map((e, i) => {
return (
<InputLink
key={i + 1}
input={e}
setInput={(e) => {
setInput(input.map((f, j) => (j === i ? e : f)));
}}
/>
);
})}
<AddInputButton setInput={setInput} />
<div style={{margin:"auto",width:"calc(50% + 256px)"}}>
<SampleData setInput={setInput} />
{input.map((e, i) => {
return (
<InputLink
key={i + 1}
input={e}
setInput={(e) => {
setInput(input.map((f, j) => (j === i ? e : f)));
}}
/>
);
})}
<AddInputButton setInput={setInput} />
</div>
<ViewGraphButton
input={input}
setInput={setInput}
Expand Down

0 comments on commit 8bdc14b

Please sign in to comment.