mirror of
https://github.com/SomboChea/ui
synced 2026-01-20 18:15:51 +07:00
fix: rest MUI components - Introduced ForwardRef (#224)
* refactor(162): added forwardRef Card * refactor(162): introduced forwardRefDivider * refactor(162): introduced forwardRef MuiComponents * refactor(162): introducing forwardRef * refactor(162): introduced forwardRef * refactor(162): introduced forwardRef * fix(162): fixed link * fix: fixed port number * fix: fixed duplicated id * fix: fixed ref iconbutton * fix: updated snaps * fix: fixed port * fix: fixed eslint errors * fix: the item should be a button * fix: fixed eslint errors
This commit is contained in:
committed by
Juan Picado @jotadeveloper
parent
a4cdd145d2
commit
b56e43846b
@@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React, { Fragment, ReactElement } from 'react';
|
||||
|
||||
import Package from '../Package';
|
||||
import Help from '../Help';
|
||||
@@ -13,16 +13,16 @@ interface Props {
|
||||
}
|
||||
|
||||
export const PackageList: React.FC<Props> = props => {
|
||||
const renderPackages: () => React.ReactElement<HTMLElement>[] = () => {
|
||||
const renderPackages: () => ReactElement<HTMLElement>[] = () => {
|
||||
return props.packages.map((pkg, i) => {
|
||||
const { name, version, description, time, keywords, dist, homepage, bugs, author } = pkg;
|
||||
// TODO: move format license to API side.
|
||||
const license = formatLicense(pkg.license);
|
||||
return (
|
||||
<React.Fragment key={i}>
|
||||
<Fragment key={i}>
|
||||
{i !== 0 && <Divider />}
|
||||
<Package {...{ name, dist, version, author, description, license, time, keywords, homepage, bugs }} />
|
||||
</React.Fragment>
|
||||
</Fragment>
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user