mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-29 12:45:32 +08:00
style(prettier): format code style
This commit is contained in:
@@ -17,40 +17,39 @@ const defaultProps = {
|
||||
type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>
|
||||
export type DescriptionProps = Props & typeof defaultProps & NativeAttrs
|
||||
|
||||
const Description: React.FC<DescriptionProps> = ({
|
||||
title, content, className, ...props
|
||||
}) => {
|
||||
const Description: React.FC<DescriptionProps> = ({ title, content, className, ...props }) => {
|
||||
const theme = useTheme()
|
||||
return (
|
||||
<dl className={className} {...props}>
|
||||
<dt>{title}</dt>
|
||||
<dd>{content}</dd>
|
||||
|
||||
|
||||
<style jsx>{`
|
||||
dl {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
dt {
|
||||
height: .875rem;
|
||||
line-height: .875rem;
|
||||
font-size: .75rem;
|
||||
margin-bottom: .5rem;
|
||||
height: 0.875rem;
|
||||
line-height: 0.875rem;
|
||||
font-size: 0.75rem;
|
||||
margin-bottom: 0.5rem;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
color: ${theme.palette.accents_5};
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
||||
dd {
|
||||
margin: 0;
|
||||
font-size: .875rem;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1rem;
|
||||
color: ${theme.palette.foreground};
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
dd :global(p), dt :global(p) {
|
||||
|
||||
dd :global(p),
|
||||
dt :global(p) {
|
||||
margin: 0;
|
||||
}
|
||||
`}</style>
|
||||
|
||||
Reference in New Issue
Block a user