Skip to content

Commit

Permalink
Merge pull request #153 from ChtiJS/styleolulphrli
Browse files Browse the repository at this point in the history
style hr li ol p
  • Loading branch information
nfroidure authored Dec 12, 2023
2 parents 6419c19 + 929663f commit 1f84bf6
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 34 deletions.
4 changes: 4 additions & 0 deletions src/components/hr.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.root {
border-bottom: var(--border) solid var(--green2);
margin: 0 0 var(--vRythm) 0;
}
9 changes: 2 additions & 7 deletions src/components/hr.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import { HTMLAttributes } from 'react';
import styles from './hr.module.scss';

const HorizontalRule = (props: HTMLAttributes<HTMLHRElement>) => (
<>
<hr className="root" {...props} />
<style jsx>{`
.root {
border-bottom: var(--border) solid var(--green2);
margin: 0 0 var(--vRythm) 0;
}
`}</style>
<hr className={styles.root} {...props} />
</>
);

Expand Down
6 changes: 6 additions & 0 deletions src/components/li.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.root > :global(:first-child:last-child) {
margin: 0;
}
li {
margin-left: 50px;
}
11 changes: 2 additions & 9 deletions src/components/li.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
import styles from './li.module.scss';
const ListItem = ({
children,
...props
}: {
children: React.ReactNode;
} & React.LiHTMLAttributes<HTMLLIElement>) => (
<li className="root" {...props}>
<li className={styles.root} {...props}>
{children}
<style jsx>{`
.root > :global(:first-child:last-child) {
margin: 0;
}
li {
margin-left: 50px;
}
`}</style>
</li>
);

Expand Down
3 changes: 3 additions & 0 deletions src/components/ol.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.root {
margin: 0 0 var(--vRythm) 0;
}
8 changes: 2 additions & 6 deletions src/components/ol.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import styles from './ol.module.scss';
const OrderedList = ({
children,
...props
}: {
children: React.ReactNode;
} & React.OlHTMLAttributes<HTMLOListElement>) => (
<ol className="root" {...props}>
<ol className={styles.root} {...props}>
{children}
<style jsx>{`
.root {
margin: 0 0 var(--vRythm) 0;
}
`}</style>
</ol>
);

Expand Down
3 changes: 3 additions & 0 deletions src/components/p.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.root {
margin: 0 0 var(--vRythm) 0;
}
8 changes: 2 additions & 6 deletions src/components/p.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import styles from './p.module.scss';
const Paragraph = ({
children,
...props
}: {
children: React.ReactNode;
} & React.HTMLAttributes<HTMLParagraphElement>) => (
<p className="root" {...props}>
<p className={styles.root} {...props}>
{children}
<style jsx>{`
.root {
margin: 0 0 var(--vRythm) 0;
}
`}</style>
</p>
);

Expand Down
3 changes: 3 additions & 0 deletions src/components/ul.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.root {
margin: 0 0 var(--vRythm) 0;
}
8 changes: 2 additions & 6 deletions src/components/ul.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import styles from './ul.module.scss';
const UnorderedList = ({
children,
...props
}: { children: React.ReactNode } & React.HTMLAttributes<HTMLUListElement>) => (
<ul className="root" {...props}>
<ul className={styles.root} {...props}>
{children}
<style jsx>{`
.root {
margin: 0 0 var(--vRythm) 0;
}
`}</style>
</ul>
);

Expand Down

0 comments on commit 1f84bf6

Please sign in to comment.