-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@fluent-ui/core): Add propTypes support for all components
- Loading branch information
Showing
66 changed files
with
2,850 additions
and
1,622 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
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
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,20 +1,22 @@ | ||
import * as React from 'react' | ||
import { BaseBox, AcrylicBox } from './Box.styled' | ||
import { BoxProps } from './Box.type' | ||
import { BoxProps, BoxPropTypes } from './Box.type' | ||
import { getSystemPropTypes, system } from '../styles/styled' | ||
|
||
const Box = React.forwardRef<HTMLDivElement, BoxProps>( | ||
({ acrylic, ...rest }: BoxProps, ref): React.ReactElement => { | ||
const Box: React.FC<BoxProps> = React.forwardRef<HTMLDivElement, BoxProps>( | ||
({ acrylic = false, ...rest }, ref): React.ReactElement => { | ||
if (acrylic) { | ||
return <AcrylicBox ref={ref} {...rest} /> | ||
} | ||
return <BaseBox ref={ref} {...rest} /> | ||
} | ||
) | ||
|
||
Box.defaultProps = { | ||
acrylic: false | ||
} | ||
|
||
Box.displayName = 'FBox' | ||
|
||
Box.propTypes = { | ||
...getSystemPropTypes(system), | ||
...BoxPropTypes | ||
} | ||
|
||
export default Box |
Oops, something went wrong.