Skip to content

Commit

Permalink
Merge pull request #156 from ChtiJS/refacto/stylesCite
Browse files Browse the repository at this point in the history
fix(ui): changes styles on cite, code, em and strong
  • Loading branch information
nfroidure authored Dec 12, 2023
2 parents 1f84bf6 + 0cbbe31 commit 2773eee
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 28 deletions.
7 changes: 7 additions & 0 deletions src/components/cite.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* cite.module.scss */

.root {
color: var(--primary);
text-decoration: underline;
}

12 changes: 5 additions & 7 deletions src/components/cite.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import React from 'react';
import styles from './cite.module.scss';


const Cite = ({
children,
...props
}: {
children: React.ReactNode;
} & React.HTMLAttributes<HTMLElement>) => (
<cite className="root" {...props}>
<cite className={styles.root} {...props}>
{children}
<style jsx>{`
.root {
color: var(--primary);
text-decoration: underline;
}
`}</style>
</cite>
);

Expand Down
7 changes: 7 additions & 0 deletions src/components/code.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* code.module.scss */

.root {
text-decoration: none;
font-family: monospace;
}

11 changes: 4 additions & 7 deletions src/components/code.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import React from 'react';
import styles from './code.module.scss';

const Code = ({
children,
...props
}: {
children: React.ReactNode;
} & React.HTMLAttributes<HTMLElement>) => (
<code className="root" {...props}>
<code className={styles.root} {...props}>
{children}
<style jsx>{`
.root {
text-decoration: none;
font-family: monospace;
}
`}</style>
</code>
);

Expand Down
7 changes: 7 additions & 0 deletions src/components/em.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* em.module.scss */

.root {
text-decoration: none;
font-style: italic;
}

11 changes: 4 additions & 7 deletions src/components/em.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import React from 'react';
import styles from './em.module.scss';

const Emphasis = ({
children,
...props
}: {
children: React.ReactNode;
} & React.HTMLAttributes<HTMLElement>) => (
<em className="root" {...props}>
<em className={styles.root} {...props}>
{children}
<style jsx>{`
.root {
text-decoration: none;
font-style: italic;
}
`}</style>
</em>
);

Expand Down
7 changes: 7 additions & 0 deletions src/components/strong.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* strong.module.scss */

.root {
color: var(--quinary);
font-weight: bold;
}

11 changes: 4 additions & 7 deletions src/components/strong.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import React from 'react';
import styles from './strong.module.scss';

const Strong = ({
children,
...props
}: {
children: React.ReactNode;
} & React.HTMLAttributes<HTMLElement>) => (
<strong className="root" {...props}>
<strong className={styles.root} {...props}>
{children}
<style jsx>{`
.root {
color: var(--quinary);
font-weight: bold;
}
`}</style>
</strong>
);

Expand Down

0 comments on commit 2773eee

Please sign in to comment.