Skip to content

Commit 92aef44

Browse files
committed
Fixed formatting
1 parent aec5ca4 commit 92aef44

File tree

71 files changed

+393
-367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+393
-367
lines changed

.storybook/main.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
import type { StorybookConfig } from '@storybook/react-vite';
22
import remarkGfm from 'remark-gfm';
33

4-
54
async function filterStories(list): Promise<StoriesEntry[]> {
6-
console.log(list)
7-
return ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)']
5+
console.log(list);
6+
return ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'];
87
}
98

109
const config: StorybookConfig = {
11-
stories: async (list: StoriesEntry[]) => [
12-
...(await filterStories(list)),
13-
],
10+
stories: async (list: StoriesEntry[]) => [...(await filterStories(list))],
1411
addons: [
1512
{
1613
name: '@storybook/addon-docs',

src/App.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
import React from 'react';
33

44
function App() {
5-
return (
6-
<div></div>
7-
);
5+
return <div></div>;
86
}
97

108
export default App;

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import App from './App';
44
import reportWebVitals from './reportWebVitals';
55

66
const root = ReactDOM.createRoot(
7-
document.getElementById('root') as HTMLElement
7+
document.getElementById('root') as HTMLElement,
88
);
99
root.render(
1010
<React.StrictMode>
1111
<App />
12-
</React.StrictMode>
12+
</React.StrictMode>,
1313
);
1414

1515
// If you want to start measuring performance in your app, pass a function

src/lib/components/accordion/accordion.spec.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import Accordion from './accordion';
66
describe('Accordion', () => {
77
it('should render successfully', () => {
88
const { baseElement } = render(
9-
<Accordion renderContent={() => <div>content</div>} children={() => <div>child</div>} />
9+
<Accordion
10+
renderContent={() => <div>content</div>}
11+
children={() => <div>child</div>}
12+
/>,
1013
);
1114
expect(baseElement).toBeTruthy();
1215
});

src/lib/components/activity-feed-item/activity-feed-item.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@ interface ActivityFeedItemProps {
150150
loading: boolean;
151151
actionIdentificationHashes: ActionIdentificationHashesType;
152152
csprLiveDomainPath: string;
153-
getAccountInfo: (
154-
publicKey: string,
155-
) => AccountInfoResult | null | undefined;
153+
getAccountInfo: (publicKey: string) => AccountInfoResult | null | undefined;
156154
getContractInfoByHash?: (
157155
contractHash: string,
158156
) => ContractResult | null | undefined;

src/lib/components/alert/alert.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React from 'react';
2-
import {render} from '@testing-library/react';
2+
import { render } from '@testing-library/react';
33

4-
import Alert, {AlertStatus} from './alert';
4+
import Alert, { AlertStatus } from './alert';
55

66
describe('Alert', () => {
77
it('should render successfully', () => {
88
const { baseElement } = render(
9-
<Alert message="test" status={AlertStatus.Success} />
9+
<Alert message="test" status={AlertStatus.Success} />,
1010
);
1111
expect(baseElement).toBeTruthy();
1212
});

src/lib/components/badge/badge.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const StyledBadge = styled.div<StyledBadgeProps>(
4646
borderRadius: '40px',
4747
minHeight: '17px',
4848
padding: '0 6px 1px 6px',
49-
})
49+
}),
5050
);
5151

5252
const StyledLabelContentWrapper = styled.div(({ theme }) => ({
@@ -74,7 +74,7 @@ export const Badge = React.forwardRef<HTMLDivElement, BadgeProps>(
7474
<StyledLabelContentWrapper>{props.label}</StyledLabelContentWrapper>
7575
</Label>
7676
</StyledBadge>
77-
)
77+
),
7878
);
7979

8080
export default Badge;

src/lib/components/body-text/body-text.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const StyledText = styled(Text)<BodyTextProps>(
2323
3: theme.typography.fontWeight.regular,
2424
4: theme.typography.fontWeight.light,
2525
},
26-
size
26+
size,
2727
),
2828
fontSize: matchSize(
2929
{
@@ -33,24 +33,24 @@ const StyledText = styled(Text)<BodyTextProps>(
3333
sm: '0.875rem',
3434
xs: '0.813rem',
3535
},
36-
scale
36+
scale,
3737
),
3838
lineHeight: matchSize(
3939
{
4040
sm: '1.5rem',
4141
xs: '1.25rem',
4242
},
43-
lineHeight
43+
lineHeight,
4444
),
45-
'&:where(h1, h2, h3, h4, h5, h6)': {
46-
margin: 0,
47-
},
48-
})
45+
'&:where(h1, h2, h3, h4, h5, h6)': {
46+
margin: 0,
47+
},
48+
}),
4949
);
5050

5151
export const BodyText = React.forwardRef<Ref, BodyTextProps>(function BodyText(
5252
props: BodyTextProps,
53-
ref
53+
ref,
5454
) {
5555
return <StyledText ref={ref} {...props} />;
5656
});

src/lib/components/caption-text/caption-text.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ const StyledText = styled(Text)<CaptionTextProps>(({ theme, size = 2 }) => ({
1616
1: theme.typography.fontWeight.medium,
1717
2: theme.typography.fontWeight.regular,
1818
},
19-
size
19+
size,
2020
),
2121
fontSize: '0.688rem',
22-
lineHeight: matchSize(
23-
{
24-
1: '1.25rem',
25-
2: '1rem',
26-
},
27-
size
28-
)
22+
lineHeight: matchSize(
23+
{
24+
1: '1.25rem',
25+
2: '1rem',
26+
},
27+
size,
28+
),
2929
}));
3030

3131
export function CaptionText(props: CaptionTextProps) {

src/lib/components/checkbox/checkbox.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,30 @@ const StyledFlexRow = styled(FlexRow)<{
2626
checked && !disabled && customCheckedColor
2727
? customCheckedColor
2828
: checked && !disabled
29-
? theme.styleguideColors.contentBlue
30-
: 'none',
29+
? theme.styleguideColors.contentBlue
30+
: 'none',
3131
path: {
3232
fill:
3333
checked && !disabled
3434
? theme.styleguideColors.backgroundPrimary
3535
: checked && disabled
36-
? theme.styleguideColors.contentQuaternary
37-
: 'none',
36+
? theme.styleguideColors.contentQuaternary
37+
: 'none',
3838
},
3939
rect: {
4040
stroke: disabled
4141
? theme.styleguideColors.contentQuaternary
4242
: customUncheckedColor
43-
? customUncheckedColor
44-
: theme.styleguideColors.contentBlue,
43+
? customUncheckedColor
44+
: theme.styleguideColors.contentBlue,
4545
},
4646
},
4747
span: {
4848
color: disabled
4949
? theme.styleguideColors.contentQuaternary
5050
: theme.styleguideColors.contentPrimary,
5151
},
52-
})
52+
}),
5353
);
5454

5555
export enum CheckboxFontSize {
@@ -107,16 +107,16 @@ export function Checkbox({
107107
disabled={disabled}
108108
onClick={handleClick}
109109
onKeyDown={(ev) => {
110-
if(ev.key === 'Enter'){
111-
handleClick(ev)
110+
if (ev.key === 'Enter') {
111+
handleClick(ev);
112112
}
113113
}}
114114
customCheckedColor={customCheckedColor}
115115
customUncheckedColor={customUncheckedColor}
116116
role="checkbox"
117117
aria-checked={checked}
118118
aria-disabled={disabled}
119-
aria-label={checked ? "Checked" : "Not checked"}
119+
aria-label={checked ? 'Checked' : 'Not checked'}
120120
tabIndex={0}
121121
>
122122
<SvgIcon src={iconSrc} />

0 commit comments

Comments
 (0)