Skip to content

Commit

Permalink
minor refactor: rename JSX.Element => React.JSX.Element
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Dec 26, 2024
1 parent 36665c4 commit 6c37e6f
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 21 deletions.
6 changes: 5 additions & 1 deletion docs/components/Figure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ export { Figure }

import React from 'react'

function Figure({ width, text, children }: { width: number; text: string | JSX.Element; children: React.ReactNode }) {
function Figure({
width,
text,
children
}: { width: number; text: string | React.JSX.Element; children: React.ReactNode }) {
return (
<>
<div
Expand Down
4 changes: 2 additions & 2 deletions docs/components/static-host.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export { StaticHostDocOutro }
import { Link } from '@brillout/docpress'
import React from 'react'

function StaticHostDocIntro({ staticHostLink }: { staticHostLink?: JSX.Element }) {
function StaticHostDocIntro({ staticHostLink }: { staticHostLink?: React.JSX.Element }) {
return (
<>
<p>
Expand Down Expand Up @@ -46,7 +46,7 @@ function StaticHostDocStrategies({ name = 'the static host' }: { name?: string }
</>
)
}
function StaticHostDocOutro({ baseUrlAddendum }: { baseUrlAddendum?: JSX.Element }) {
function StaticHostDocOutro({ baseUrlAddendum }: { baseUrlAddendum?: React.JSX.Element }) {
return (
<>
<p>
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"typecheck": "tsc --noEmit --watch"
},
"dependencies": {
"@brillout/docpress": "^0.10.11",
"@brillout/docpress": "^0.10.12",
"@types/node": "^22.10.2",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/index/components/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from 'react'

const iconSizeDefault = 28

function Icon({ icon, size, color }: { icon: JSX.Element; size: number; color: string }) {
function Icon({ icon, size, color }: { icon: React.JSX.Element; size: number; color: string }) {
const margin = (iconSizeDefault - size) / 2
return (
<div
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/index/components/ParagraphTextCollection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export const ParagraphTextCollection = ({
buttonLable
}: {
title: string
description: string | JSX.Element
description: string | React.JSX.Element
buttonLable?: string
icon: JSX.Element
icon: React.JSX.Element
}) => {
return (
<div style={{ width: '100%' }}>
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/index/components/SectionTextCollection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export const SectionTextCollection = ({
style
}: {
caption: string
title: string | JSX.Element
descriptions?: (string | JSX.Element)[]
title: string | React.JSX.Element
descriptions?: (string | React.JSX.Element)[]
style?: React.CSSProperties
}) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/index/components/Slotmachine/Slotmachine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type slotMachineRegistryType = {
name: string
group: slotMachineGroupType
bgColor: string
logo: JSX.Element
logo: React.JSX.Element
}

export const Slotmachine = () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/index/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="vite/client" />

declare module '*.svg?react' {
const value: () => JSX.Element
const value: () => React.JSX.Element
export default value
}
2 changes: 1 addition & 1 deletion docs/pages/pageContext/+Page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ declare global {
isAdmin: boolean
}
// Refine type of pageContext.Page (it's `unknown` by default)
Page: () => JSX.Element
Page: () => React.JSX.Element
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/pricing/value-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function compute_color(value: number) {
return COLOR_ORANGE
}

function TableRef({ name, children }: { name: string; children: JSX.Element[] }) {
function TableRef({ name, children }: { name: string; children: React.JSX.Element[] }) {
return (
<>
<em>{name}</em>: {children}
Expand Down
60 changes: 52 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6c37e6f

Please sign in to comment.