mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-02-06 09:55:47 +00:00
fix(lib): remove unnecessary default prop values and format tests
This commit is contained in:
parent
6f45c47765
commit
7c31198792
@ -20,12 +20,12 @@ export const Layer = ({
|
||||
id,
|
||||
data,
|
||||
children,
|
||||
name = 'places',
|
||||
menuText = 'add new place',
|
||||
menuColor = '#2E7D32',
|
||||
name,
|
||||
menuText,
|
||||
menuColor,
|
||||
markerIcon,
|
||||
markerShape = 'circle',
|
||||
markerDefaultColor = '#777',
|
||||
markerDefaultColor,
|
||||
markerDefaultColor2 = 'RGBA(35, 31, 32, 0.2)',
|
||||
api,
|
||||
itemType,
|
||||
|
||||
@ -5,7 +5,7 @@ import LayerSVG from '#assets/layer.svg'
|
||||
import { useIsLayerVisible, useToggleVisibleLayer } from '#components/Map/hooks/useFilter'
|
||||
import { useLayers } from '#components/Map/hooks/useLayers'
|
||||
|
||||
export function LayerControl({ expandLayerControl = false }: { expandLayerControl: boolean }) {
|
||||
export function LayerControl({ expandLayerControl }: { expandLayerControl: boolean }) {
|
||||
const [open, setOpen] = useState(expandLayerControl)
|
||||
|
||||
const layers = useLayers()
|
||||
|
||||
@ -6,7 +6,7 @@ import type { Item } from '#types/Item'
|
||||
|
||||
export const ProfileTextView = ({
|
||||
item,
|
||||
dataField = 'text',
|
||||
dataField,
|
||||
heading,
|
||||
hideWhenEmpty,
|
||||
}: {
|
||||
|
||||
@ -310,7 +310,6 @@ describe('preprocessItemMentions', () => {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// removeMarkdownSyntax
|
||||
// ============================================================================
|
||||
@ -498,4 +497,3 @@ describe('preprocessMarkdown', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -129,7 +129,10 @@ describe('simpleMarkdownToHtml', () => {
|
||||
describe('Item Mentions', () => {
|
||||
it('renders mention as link with item color', () => {
|
||||
const input = '<span data-item-mention data-label="Alice" data-id="abc-123">@Alice</span>'
|
||||
const result = simpleMarkdownToHtml(input, [], { items: mockItems, getItemColor: mockGetItemColor })
|
||||
const result = simpleMarkdownToHtml(input, [], {
|
||||
items: mockItems,
|
||||
getItemColor: mockGetItemColor,
|
||||
})
|
||||
expect(result).toContain('href="/item/abc-123"')
|
||||
expect(result).toContain('class="item-mention"')
|
||||
expect(result).toContain('style="color: #ef4444')
|
||||
@ -159,4 +162,3 @@ describe('simpleMarkdownToHtml', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -197,4 +197,3 @@ describe('XSS Prevention - simpleMarkdownToHtml', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user