Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
omarmhaimdat committed Dec 2, 2023
1 parent 6682629 commit cda8584
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
44 changes: 22 additions & 22 deletions packages/fastui/src/components/image.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
import {FC} from 'react'
import { FC } from 'react'

import {ClassName, useClassName} from '../hooks/className'
import {useFireEvent, AnyEvent} from '../events'
import { ClassName, useClassName } from '../hooks/className'
import { useFireEvent, AnyEvent } from '../events'

export interface ImageProps {
type: 'Image'
src: string
alt?: string
width?: number | string
height?: number | string
onClick?: AnyEvent
className?: ClassName
type: 'Image'
src: string
alt?: string
width?: number | string
height?: number | string
onClick?: AnyEvent
className?: ClassName
}

export const ImageComp: FC<ImageProps> = (props) => {
const {src, alt, width, height, onClick} = props
const { src, alt, width, height, onClick } = props

const {fireEvent} = useFireEvent()
const { fireEvent } = useFireEvent()

return (
<img
className={useClassName(props)}
src={src}
alt={alt}
width={width}
height={height}
onClick={() => fireEvent(onClick)}
/>
)
return (
<img
className={useClassName(props)}
src={src}
alt={alt}
width={width}
height={height}
onClick={() => fireEvent(onClick)}
/>
)
}
1 change: 1 addition & 0 deletions python/fastui/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ class ServerLoad(pydantic.BaseModel, extra='forbid'):
sse: bool | None = None
type: typing.Literal['ServerLoad'] = 'ServerLoad'


class Image(pydantic.BaseModel, extra='forbid'):
src: str
alt: str | None = None
Expand Down

0 comments on commit cda8584

Please sign in to comment.