👉 程式碼下載
$ npm install --save styled-components
import styled from 'styled-components'
const Title = styled.h1`
color: #ccffff;
font-size: 40px;
text-align: center;
`;
const Wrapper = styled.div`
background-color: #ff9933;
border-radius: 10px;
padding: 20px;
margin: 20px;
box-shadow: 0 0 10px rgba(0,0,0,0.2);
`;
const Button = styled.button`
background-color: ${props => props.$primary ? "#008CBA" : "#4CAF50"};
border: none;
color: ${props => props.$primary ? "white" : "black"};
padding: 15px 32px;
margin: 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
`;
const Button = styled.button`
background-color: #4CAF50;
border: none;
color: "black";
padding: 15px 32px;
margin: 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
`;
const ButtonOne = styled(Button)`
background-color: #f44336;
color: "white";
`;
const Input = styled.input`
padding: 0.5em;
margin: 0.5em;
color: ${props => props.inputColor || "palevioletred"};
background: white;
border: solid 1px black;
border-radius: 3px;
`;
const Thing = styled.div.attrs((/* props */) => ({ tabIndex: 0 }))`
color: blue;
&:hover {
color: red;
}
& ~ & {
background: tomato;
}
& + & {
background: lime;
}
&.something {
background: orange;
}
.something-else & {
border: 1px solid;
}
`
function Dashboard(){
return (
<React.Fragment>
<Thing> senrence 1 </Thing>
<Thing> senrence 2 </Thing>
<Thing className="something"> senrence 3 </Thing>
<div> senrence 4 </div>
<Thing> senrence 5 </Thing>
<div className="something-else">
<Thing> senrence 6 </Thing>
</div>
</React.Fragment>
);
}
$ npm install react-icons --save
:::info 🎯 回首頁 ::: 前端行動家_0505class accout
May 5, 2023前端行動家共筆 :::warning ✍ 補課申請連結 ::: 0414 class 👉 https://hackmd.io/@futurenest/frontend_0414 Figma 教學 React 認識
May 5, 2023:::info 🎯 回首頁 ::: 前端行動家共筆_0421class 👉 程式碼下載 install npm install react-router-dom@5.2.0 import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom";
Apr 27, 2023:::info 🎯 回首頁 ::: 前端行動家共筆_0414class Figma 👉 NFTs APP虛擬資產遊玩 Figma
Apr 22, 2023or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up