Skip to content

Commit cd40930

Browse files
WesSouzaarturbien
authored andcommitted
refactor(appbar): change to named exports
1 parent 58473f5 commit cd40930

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

src/AppBar/AppBar.mdx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,20 @@ name: AppBar
33
menu: Components
44
---
55

6-
import AppBar from './AppBar'
7-
import Toolbar from '../Toolbar/Toolbar'
8-
import Button from '../Button/Button'
9-
import TextField from '../TextField/TextField'
10-
import List from '../List/List'
11-
import ListItem from '../ListItem/ListItem'
12-
import Divider from '../Divider/Divider'
6+
import { AppBar } from './AppBar';
7+
import Toolbar from '../Toolbar/Toolbar';
8+
import Button from '../Button/Button';
9+
import TextField from '../TextField/TextField';
10+
import List from '../List/List';
11+
import ListItem from '../ListItem/ListItem';
12+
import Divider from '../Divider/Divider';
1313

1414
# AppBar
1515

1616
## Usage
1717

1818
#### Default
1919

20-
2120
<Playground>
2221
{() => {
2322
const [open, setOpen] = React.useState(false);
@@ -62,7 +61,7 @@ import Divider from '../Divider/Divider'
6261
</Button>
6362
</div>
6463
);
65-
}
64+
};
6665
return (
6766
<AppBar style={{ position: 'relative' }}>
6867
<Toolbar style={{ justifyContent: 'space-between' }}>
@@ -74,7 +73,7 @@ import Divider from '../Divider/Divider'
7473
/>
7574
</Toolbar>
7675
</AppBar>
77-
)
76+
);
7877
}}
7978
</Playground>
8079

src/AppBar/AppBar.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { render } from '@testing-library/react';
22

3-
import AppBar from './AppBar';
3+
import { AppBar } from './AppBar';
44

55
const defaultProps = { children: '' };
66

src/AppBar/AppBar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styled from 'styled-components';
33
import { CommonStyledProps } from '../types';
44
import { createBorderStyles, createBoxStyles } from '../common';
55

6-
export type AppBarProps = {
6+
type AppBarProps = {
77
children: React.ReactNode;
88
fixed?: boolean;
99
} & React.HTMLAttributes<HTMLElement> &
@@ -33,4 +33,4 @@ const AppBar = forwardRef<HTMLElement, AppBarProps>(function AppBar(
3333
);
3434
});
3535

36-
export default AppBar;
36+
export { AppBar, AppBarProps };

src/Bar/Bar.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Bar
33
menu: Components
44
---
55

6-
import Bar from '../Bar/Bar'
7-
import AppBar from '../AppBar/AppBar.js'
8-
import Toolbar from '../Toolbar/Toolbar.js'
9-
import Button from '../Button/Button.js'
6+
import { Bar } from '../Bar/Bar';
7+
import { AppBar } from '../AppBar/AppBar.js';
8+
import Toolbar from '../Toolbar/Toolbar.js';
9+
import Button from '../Button/Button.js';
1010

1111
# Bar
1212

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export { createScrollbars } from './common/index';
44

55
/* components */
66
export * from './Anchor/Anchor';
7-
export { default as AppBar } from './AppBar/AppBar';
7+
export * from './AppBar/AppBar';
88
export * from './Avatar/Avatar';
99
export * from './Bar/Bar';
1010
export { default as Button } from './Button/Button';

0 commit comments

Comments
 (0)