generated from layer5io/layer5-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #859 from capricorn-32/fix/forwardRef
fix(box): add forwardRef to box component
- Loading branch information
Showing
57 changed files
with
261 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { Accordion as MuiAccordion, type AccordionProps as MuiAccordionProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function Accordion(props: MuiAccordionProps): JSX.Element { | ||
return <MuiAccordion {...props} />; | ||
} | ||
const Accordion = React.forwardRef<HTMLDivElement, MuiAccordionProps>((props, ref) => { | ||
return <MuiAccordion {...props} ref={ref} />; | ||
}); | ||
|
||
export default Accordion; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { AppBar as MuiAppBar, type AppBarProps as MuiAppBarProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function AppBar(props: MuiAppBarProps): JSX.Element { | ||
return <MuiAppBar {...props} />; | ||
} | ||
const AppBar = React.forwardRef<HTMLDivElement, MuiAppBarProps>((props, ref) => { | ||
return <MuiAppBar {...props} ref={ref} />; | ||
}); | ||
|
||
export default AppBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { Avatar as MuiAvatar, type AvatarProps as MuiAvatarProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function Avatar(props: MuiAvatarProps): JSX.Element { | ||
return <MuiAvatar {...props} />; | ||
} | ||
const Avatar = React.forwardRef<HTMLDivElement, MuiAvatarProps>((props, ref) => { | ||
return <MuiAvatar {...props} ref={ref} />; | ||
}); | ||
|
||
export default Avatar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { AvatarProps } from '@mui/material'; | ||
import { Avatar } from './Avatar'; | ||
import Avatar from './Avatar'; | ||
|
||
export { Avatar }; | ||
export type { AvatarProps }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { Backdrop as MuiBackdrop, type BackdropProps as MuiBackdropProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function Backdrop(props: MuiBackdropProps): JSX.Element { | ||
return <MuiBackdrop {...props} />; | ||
} | ||
const Backdrop = React.forwardRef<HTMLDivElement, MuiBackdropProps>((props, ref) => { | ||
return <MuiBackdrop {...props} ref={ref} />; | ||
}); | ||
|
||
export default Backdrop; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { Badge as MuiBadge, type BadgeProps as MuiBadgeProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function Badge(props: MuiBadgeProps): JSX.Element { | ||
return <MuiBadge {...props} />; | ||
} | ||
const Badge = React.forwardRef<HTMLDivElement, MuiBadgeProps>((props, ref) => { | ||
return <MuiBadge {...props} ref={ref} />; | ||
}); | ||
|
||
export default Badge; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { Box as MuiBox, type BoxProps as MuiBoxProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function Box(props: MuiBoxProps): JSX.Element { | ||
return <MuiBox {...props} />; | ||
} | ||
const Box = React.forwardRef<HTMLDivElement, MuiBoxProps>((props, ref) => { | ||
return <MuiBox {...props} ref={ref} />; | ||
}); | ||
|
||
export default Box; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { Card as MuiCard, type CardProps as MuiCardProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function Card(props: MuiCardProps): JSX.Element { | ||
return <MuiCard {...props} />; | ||
} | ||
const Card = React.forwardRef<HTMLDivElement, MuiCardProps>((props, ref) => { | ||
return <MuiCard {...props} ref={ref} />; | ||
}); | ||
|
||
export default Card; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { CardHeader as MuiCardHeader, CardHeaderProps as MuiCardHeaderProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function CardHeader(props: MuiCardHeaderProps): JSX.Element { | ||
return <MuiCardHeader {...props} />; | ||
} | ||
const CardHeader = React.forwardRef<HTMLDivElement, MuiCardHeaderProps>((props, ref) => { | ||
return <MuiCardHeader {...props} ref={ref} />; | ||
}); | ||
|
||
export default CardHeader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { CardMedia as MuiCardMedia, CardMediaProps as MuiCardMediaProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function CardMedia(props: MuiCardMediaProps): JSX.Element { | ||
return <MuiCardMedia {...props} />; | ||
} | ||
const CardMedia = React.forwardRef<HTMLDivElement, MuiCardMediaProps>((props, ref) => { | ||
return <MuiCardMedia {...props} ref={ref} />; | ||
}); | ||
|
||
export default CardMedia; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { Checkbox as MuiCheckbox, type CheckboxProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function Checkbox(props: CheckboxProps): JSX.Element { | ||
return <MuiCheckbox {...props} />; | ||
} | ||
const Checkbox = React.forwardRef<HTMLButtonElement, CheckboxProps>((props, ref) => { | ||
return <MuiCheckbox {...props} ref={ref} />; | ||
}); | ||
|
||
export default Checkbox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { Chip as MuiChip, type ChipProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function Chip(props: ChipProps): JSX.Element { | ||
return <MuiChip {...props} />; | ||
} | ||
const Chip = React.forwardRef<HTMLDivElement, ChipProps>((props, ref) => { | ||
return <MuiChip {...props} ref={ref} />; | ||
}); | ||
|
||
export default Chip; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import { Collapse as MuiCollapse, CollapseProps as MuiCollapseProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function Collapse(props: MuiCollapseProps): JSX.Element { | ||
return <MuiCollapse {...props} />; | ||
} | ||
const Collapse = React.forwardRef<HTMLDivElement, MuiCollapseProps>((props, ref) => { | ||
return <MuiCollapse {...props} ref={ref} />; | ||
}); | ||
|
||
export { Collapse }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { Container as MuiContainer, ContainerProps as MuiContainerProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function Container(props: MuiContainerProps): JSX.Element { | ||
return <MuiContainer {...props} />; | ||
} | ||
const Container = React.forwardRef<HTMLDivElement, MuiContainerProps>((props, ref) => { | ||
return <MuiContainer {...props} ref={ref} />; | ||
}); | ||
|
||
export default Container; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { Dialog as MuiDialog, type DialogProps as MuiDialogProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function Dialog(props: MuiDialogProps): JSX.Element { | ||
return <MuiDialog {...props} />; | ||
} | ||
const Dialog = React.forwardRef<HTMLDivElement, MuiDialogProps>((props, ref) => { | ||
return <MuiDialog {...props} ref={ref} />; | ||
}); | ||
|
||
export default Dialog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { Drawer as MuiDrawer, type DrawerProps as MuiDrawerProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export function Drawer(props: MuiDrawerProps): JSX.Element { | ||
return <MuiDrawer {...props} />; | ||
} | ||
const Drawer = React.forwardRef<HTMLDivElement, MuiDrawerProps>((props, ref) => { | ||
return <MuiDrawer {...props} ref={ref} />; | ||
}); | ||
|
||
export default Drawer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.