1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-01-17 06:08:36 +01:00

Increase line height of question answers

This commit is contained in:
Kamran Ahmed 2023-09-22 05:27:06 +01:00
parent 83df0da6b4
commit b92ae9b836
2 changed files with 4 additions and 4 deletions

View File

@ -94,7 +94,7 @@ export function QuestionCard(props: QuestionCardProps) {
>
{!question.isLongAnswer && (
<div
className={`mx-auto flex max-w-[600px] flex-grow flex-col items-center justify-center py-0 px-5 text-center text-base [&>p]:leading-snug sm:text-xl`}
className={`mx-auto flex max-w-[600px] flex-grow flex-col items-center justify-center py-0 px-5 text-center text-base [&>p]:leading-relaxed sm:text-xl`}
dangerouslySetInnerHTML={{
__html: markdownToHtml(question.answer, false),
}}

View File

@ -1,6 +1,6 @@
By default, each components DOM nodes are private. However, sometimes its useful to expose a DOM node to the parent—for example, to allow focusing it. To opt in, wrap your component definition into `forwardRef()`:
```jsx
```javascript
import { forwardRef } from 'react';
const MyInput = forwardRef(function MyInput(props, ref) {
@ -16,7 +16,7 @@ const MyInput = forwardRef(function MyInput(props, ref) {
You will receive a `ref` as the second argument after props. Pass it to the DOM node that you want to expose:
```jsx
```javascript
import { forwardRef } from 'react';
const MyInput = forwardRef(function MyInput(props, ref) {
@ -32,7 +32,7 @@ const MyInput = forwardRef(function MyInput(props, ref) {
This lets the parent Form component access their `<input>` DOM node exposed by `MyInput`:
```jsx
```javascript
function Form() {
const ref = useRef(null);