Increase line height of question answers

pull/4500/head
Kamran Ahmed 1 year ago
parent 83df0da6b4
commit b92ae9b836
  1. 2
      src/components/Questions/QuestionCard.tsx
  2. 6
      src/data/question-groups/react/content/ref-forwarding.md

@ -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),
}}

@ -1,6 +1,6 @@
By default, each component’s DOM nodes are private. However, sometimes it’s 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);

Loading…
Cancel
Save