1 | import React from "react";
|
2 | import styled from "styled-components";
|
3 | /**
|
4 | * ----------------------------------------
|
5 | * 一个段落
|
6 | * @param {String} label
|
7 | * @param {Any} children
|
8 | * ----------------------------------------
|
9 | */
|
10 | export default function Para({ label, children }) {
|
11 | return (
|
12 | <div>
|
13 | <span style={{ color: "#2d39aa" }}>{label}:</span>
|
14 | <SValue>{children}</SValue>
|
15 | </div>
|
16 | );
|
17 | }
|
18 |
|
19 | const SValue = styled.span`
|
20 | &:empty::before {
|
21 | content: "--";
|
22 | }
|
23 | `;
|