Skip to content

Commit

Permalink
feat: Ensure equal spacing between prop list info
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 16, 2020
1 parent 96650aa commit 305946d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/components/PropList.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const PropList = ({ propTypes }) => {
</div>
<div>
{deprecation && (
<div className={styles.deprecation}>
<div className={cx(styles.deprecation, styles.section)}>
<div className={styles.deprecationDate}>
Due {format(new Date(deprecation.date), 'MMMM do, yyyy')}
</div>
Expand All @@ -137,17 +137,17 @@ const PropList = ({ propTypes }) => {
)}
{description && (
<Markdown
className={cx(styles.details)}
className={cx(styles.section)}
source={description}
/>
)}
<div className={styles.propInfoContainer}>
<div className={styles.section}>
<PropTypeInfo type={type} />
</div>
{examples.map((example, idx) => (
<ReferenceExample
key={idx}
className={styles.example}
className={styles.section}
example={example}
/>
))}
Expand Down
11 changes: 1 addition & 10 deletions src/components/PropList.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
.deprecation {
padding: 0.5rem;
background: var(--color-red-100);
margin-bottom: 1rem;
}

.deprecationDate {
Expand All @@ -50,10 +49,6 @@
}
}

.details:not(:last-child):not(:empty) {
margin-bottom: 1rem;
}

.flagged {
font-size: 0.75rem;
color: var(--color-red-400);
Expand Down Expand Up @@ -84,10 +79,6 @@
}
}

.propInfoContainer:not(:last-child) {
margin-bottom: 1rem;
}

.example:not(:last-child) {
.section:not(:last-child) {
margin-bottom: 2rem;
}

0 comments on commit 305946d

Please sign in to comment.