Skip to content

Commit

Permalink
🎨 fix card and tsconfig #2616 (#2625)
Browse files Browse the repository at this point in the history
* 🎨 fix card and tsconfig

* ✏️ Small card adjustment #2616

---------

Co-authored-by: Malin J. <[email protected]>
  • Loading branch information
BorghildSelle and millianapia authored Nov 1, 2024
1 parent b19baed commit 050c927
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
18 changes: 8 additions & 10 deletions sanityv3/schemas/objects/card.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
/* eslint-disable react/display-name */
import { forwardRef } from 'react'
import { configureBlockContent } from '../editors'
import type { PortableTextBlock } from 'sanity'
import { Stack, Text, Card } from '@sanity/ui'
import { Text, Card, Box } from '@sanity/ui'
import blocksToText from '../../helpers/blocksToText'

const CardField = forwardRef((props: any) => {
const CardField = (props: any) => {
const { renderDefault } = props
return (
<Stack>
<Card padding={3} borderLeft>
<Text muted size={2} align={'left'}>
<Box>
<Text muted size={2} align="left" style={{marginBottom: 20}}>
If only title are used it will render only title as statement. If content below are used, both title and
content will be rendered.
</Text>
</Card>
<>{props.renderDefault(props)}</>
</Stack>
<>{renderDefault(props)}</>
</Box>
)
})
}

const blockConfig = {
h2: false,
Expand Down
5 changes: 5 additions & 0 deletions sanityv3/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"paths": {
"react": ["./node_modules/@types/react"]
}
},
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}

0 comments on commit 050c927

Please sign in to comment.