From ef023671b165569fe66887db3ea70a4bebbd1c14 Mon Sep 17 00:00:00 2001
From: Borghild Selle <104756130+BorghildSelle@users.noreply.github.com>
Date: Fri, 19 Apr 2024 14:41:44 +0200
Subject: [PATCH] Bose/hotfix studio (#2241)
* :art: comment
* :bug: remove component for headings in block content
---
sanityv3/schemas/editors/blockContentType.tsx | 21 +++++++++++--------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/sanityv3/schemas/editors/blockContentType.tsx b/sanityv3/schemas/editors/blockContentType.tsx
index ee79385e8..e1dc5159b 100644
--- a/sanityv3/schemas/editors/blockContentType.tsx
+++ b/sanityv3/schemas/editors/blockContentType.tsx
@@ -50,21 +50,21 @@ const SmallTextRender = (props: any) => {
}
const Level2BaseStyle = (props: any) => {
const { children } = props
- return {children}
+ return
{children}
}
const Level3BaseStyle = (props: any) => {
const { children } = props
- return {children}
+ return {children}
}
// H1 not allowed in block content since it should be a document title.
export const configureBlockContent = (options: BlockContentProps = {}): BlockDefinition => {
const {
h2 = true,
- useH2BaseStyle = true,
+ useH2BaseStyle = false,
h3 = true,
- useH3BaseStyle = true,
+ useH3BaseStyle = false,
h4 = false,
internalLink = true,
externalLink = true,
@@ -76,6 +76,7 @@ export const configureBlockContent = (options: BlockContentProps = {}): BlockDef
normalTextOverride = { title: 'Normal', value: 'normal' },
} = options
+ /** comment */
const config: BlockDefinition = {
type: 'block',
name: 'block',
@@ -112,7 +113,7 @@ export const configureBlockContent = (options: BlockContentProps = {}): BlockDef
const h2BaseConfig = { title: 'Heading 2', value: 'h2', component: Level2BaseStyle }
const h3DefaultConfig = { title: 'Heading 3', value: 'h3' }
const h3BaseConfig = { title: 'Heading 3', value: 'h3', component: Level3BaseStyle }
- const h4Config = { title: 'Heading 3', value: 'h4' }
+ const h4Config = { title: 'Heading 4', value: 'h4' }
const smallTextConfig = {
title: 'Small text',
value: 'smallText',
@@ -243,19 +244,21 @@ export const configureBlockContent = (options: BlockContentProps = {}): BlockDef
}
if (h2) {
- if (useH2BaseStyle) {
+ config?.styles?.push(h2DefaultConfig)
+ /* if (useH2BaseStyle) {
config?.styles?.push(h2BaseConfig)
} else {
config?.styles?.push(h2DefaultConfig)
- }
+ } */
}
if (h3) {
- if (useH3BaseStyle) {
+ config?.styles?.push(h3DefaultConfig)
+ /* if (useH3BaseStyle) {
config?.styles?.push(h3BaseConfig)
} else {
config?.styles?.push(h3DefaultConfig)
- }
+ } */
}
if (h4) {