Skip to content

Commit

Permalink
created base and custom directories
Browse files Browse the repository at this point in the history
Signed-off-by: Antonette Caldwell <[email protected]>
  • Loading branch information
nebula-aac committed Sep 6, 2023
1 parent 0cea355 commit 0214ed1
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 24 deletions.
4 changes: 3 additions & 1 deletion packages/components/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ module.exports = {
sourceType: 'module'
},
plugins: ['react'],
rules: {}
rules: {
'@typescript-eslint/explicit-function-return-type': ['warn']
}
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AccordionProps, Accordion as MuiAccordion } from '@mui/material';
import { Accordion as MuiAccordion, type AccordionProps } from '@mui/material';
import React from 'react';

export function Accordion(props: AccordionProps) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AccordionActionsProps, AccordionActions as MuiAccordionActions } from '@mui/material';
import { AccordionActions as MuiAccordionActions, type AccordionActionsProps } from '@mui/material';
import React from 'react';

export function AccordionActions(props: AccordionActionsProps) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AccordionDetailsProps, AccordionDetails as MuiAccordionDetails } from '@mui/material';
import { AccordionDetails as MuiAccordionDetails, type AccordionDetailsProps } from '@mui/material';
import React from 'react';

export function AccordionDetails(props: AccordionDetailsProps) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AccordionSummaryProps, AccordionSummary as MuiAccordionSummary } from '@mui/material';
import { AccordionSummary as MuiAccordionSummary, type AccordionSummaryProps } from '@mui/material';
import React from 'react';

export function AccordionSummary(props: AccordionSummaryProps) {
Expand Down
4 changes: 4 additions & 0 deletions packages/components/src/base/Accordion/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { Accordion } from './accordion';
export { AccordionActions } from './accordionactions';
export { AccordionDetails } from './accordiondetails';
export { AccordionSummary } from './accordionsummary';
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@ import { Box } from '../box';
import { InputAdornment } from '../inputadornment';
import { TextField } from '../textfield';

interface MesherySearchBarProps {
interface SearchBarProps {
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
value: string;
width?: string;
label: string;
endAdornment?: ReactNode;
}

const MesherySearchBar: FC<MesherySearchBarProps> = (
{ onChange, value, width, label, endAdornment, ...props }
) => {
const SearchBar: FC<SearchBarProps> = ({
onChange,
value,
width,
label,
endAdornment,
...props
}) => {
return (
<Fragment>
<Box
Expand Down Expand Up @@ -44,4 +49,4 @@ const MesherySearchBar: FC<MesherySearchBarProps> = (
);
};

export default MesherySearchBar;
export default SearchBar;
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
import { type TooltipProps } from '@mui/material';
import { type TooltipProps as MuiTooltipProps } from '@mui/material';
import React, { type FC, type MouseEvent, type ReactElement } from 'react';
import { Tooltip } from '../tooltip';

type MesheryTooltipProps = {
type TooltipProps = {
title: string;
onClick?: (event: MouseEvent<HTMLElement>) => void;
children: ReactElement<any, any>;
} & Omit<TooltipProps, 'title' | 'children' | 'onClick'>;
} & Omit<MuiTooltipProps, 'title' | 'children' | 'onClick'>;

export const MesheryTooltip: FC<MesheryTooltipProps> = (
{ title, onClick, placement, children, ...props }
) => {
export const MesheryTooltip: FC<TooltipProps> = ({
title,
onClick,
placement,
children,
...props
}) => {
return (
<Tooltip title={title} placement={placement} onClick={onClick} arrow {...props}>
{children}
</Tooltip>
);
};

export default MesheryTooltip;
export default Tooltip;
2 changes: 2 additions & 0 deletions packages/components/src/custom/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as SearchBar } from './SearchBar';
export { default as Tooltip } from './Tooltip';
7 changes: 2 additions & 5 deletions packages/components/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
export { Accordion } from './accordion';
export { AccordionActions } from './accordionactions';
export { AccordionDetails } from './accordiondetails';
export { AccordionSummary } from './accordionsummary';
export { AppBar } from './appbar';
export { Avatar } from './avatar';
export { AvatarGroup } from './avatargroup';
export * from './base/Accordion';
export { Box } from './box';
export { BaseButton } from './button';
export { ButtonGroup } from './buttongroup';
export { Card } from './card';
export { Checkbox } from './checkbox';
export { Chip } from './chip';
export * from './custom';
export { Dialog } from './dialog';
export { DialogActions } from './dialogactions';
export { DialogContent } from './dialogcontent';
Expand All @@ -22,7 +20,6 @@ export { IconButton } from './iconbutton';
export { InputAdornment } from './inputadornment';
export { List } from './list';
export { Menu } from './menu';
export * from './meshery';
export { Paper } from './paper';
export { RadioGroup } from './radiogroup';
export { Select } from './select';
Expand Down
2 changes: 0 additions & 2 deletions packages/components/src/meshery/index.ts

This file was deleted.

0 comments on commit 0214ed1

Please sign in to comment.