1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-30 12:40:03 +02:00

UI fixes for questions

This commit is contained in:
Kamran Ahmed
2023-09-22 05:08:24 +01:00
parent edcf0e683d
commit 80819f8914
4 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 leading-normal 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-snug sm:text-xl`}
dangerouslySetInnerHTML={{
__html: markdownToHtml(question.answer, false),
}}

View File

@@ -2,7 +2,7 @@ Pure components re-render only when the props passed to the component changes. F
To create a pure component, you can use the `memo` function from React. It is a higher order component which takes a component as an argument and returns a new component. The new component renders only if the props change.
```jsx
```javascript
import React, { memo } from 'react';
const ChildComponent = ({ name }) => {

View File

@@ -2,7 +2,7 @@ React differs from HTML in that it uses a synthetic event system instead of dire
The events such as `onClick`, `onSubmit`, `onFocus`, etc. are all camel-cased to be consistent with the naming convention in JavaScript. React event handlers are written inside curly braces:
```jsx
```javascript
function activateLasers(e) {
e.preventDefault();
console.log('The button was clicked.');

View File

@@ -38,7 +38,7 @@ const { frontmatter } = questionGroup;
noIndex={true}
>
<div class='flex bg-gray-50 pb-14 pt-4 sm:pb-16 sm:pt-8'>
<div class='container !max-w-[700px]'>
<div class='container !max-w-[740px]'>
<div class='mb-3 sm:mb-5 mt-2 text-left sm:text-center sm:mt-8'>
<div class='mb-2 md:mb-6'>
<a