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:
parent
83df0da6b4
commit
b92ae9b836
@ -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…
x
Reference in New Issue
Block a user