Skip to content

Commit 1a79f86

Browse files
fix: Migrate Bullet & BulletList to TypeScript (#57)
1 parent 1253486 commit 1a79f86

File tree

9 files changed

+48
-48
lines changed

9 files changed

+48
-48
lines changed

lib/components/Bullet/Bullet.css.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default {
2+
'.root': {
3+
marginLeft: '1.3em'
4+
}
5+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// This file is automatically generated.
2+
// Please do not change this file!
3+
export const root: string;

lib/components/Bullet/Bullet.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

lib/components/Bullet/Bullet.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React, { Component } from 'react';
2+
import Text, { Props as TextProps } from '../Text/Text';
3+
import Box from '../Box/Box';
4+
import styles from './Bullet.css.js';
5+
6+
const BulletItem = (props: TextProps) => <Text component="li" {...props} />;
7+
8+
export default class Bullet extends Component {
9+
static displayName = 'Bullet';
10+
11+
render() {
12+
return (
13+
<Box
14+
component={BulletItem}
15+
paddingBottom="xsmall"
16+
className={styles.root}
17+
{...this.props}
18+
/>
19+
);
20+
}
21+
}

lib/components/Bullet/__snapshots__/Bullet.test.js.snap

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,31 @@
22

33
exports[`Bullet Theme: jobStreet Default 1`] = `
44
<li
5-
class="Text__block fontFamily__text color__neutral fontSize__standard fontWeight__regular transform__standardText Text__listItem Box__root borderColor__standard paddingBottom__xsmall"
6-
style="margin-left: 1.3em;"
5+
class="Bullet__root Box__root borderColor__standard paddingBottom__xsmall Text__block fontFamily__text color__neutral fontSize__standard fontWeight__regular transform__standardText Text__listItem Box__root borderColor__standard"
76
>
87
Bullet
98
</li>
109
`;
1110

1211
exports[`Bullet Theme: seekAnz Default 1`] = `
1312
<li
14-
class="Text__block fontFamily__text color__neutral fontSize__standard fontWeight__regular transform__standardText Text__listItem Box__root borderColor__standard paddingBottom__xsmall"
15-
style="margin-left: 1.3em;"
13+
class="Bullet__root Box__root borderColor__standard paddingBottom__xsmall Text__block fontFamily__text color__neutral fontSize__standard fontWeight__regular transform__standardText Text__listItem Box__root borderColor__standard"
1614
>
1715
Bullet
1816
</li>
1917
`;
2018

2119
exports[`Bullet Theme: seekAsia Default 1`] = `
2220
<li
23-
class="Text__block fontFamily__text color__neutral fontSize__standard fontWeight__regular transform__standardText Text__listItem Box__root borderColor__standard paddingBottom__xsmall"
24-
style="margin-left: 1.3em;"
21+
class="Bullet__root Box__root borderColor__standard paddingBottom__xsmall Text__block fontFamily__text color__neutral fontSize__standard fontWeight__regular transform__standardText Text__listItem Box__root borderColor__standard"
2522
>
2623
Bullet
2724
</li>
2825
`;
2926

3027
exports[`Bullet Theme: wireframe Default 1`] = `
3128
<li
32-
class="Text__block fontFamily__text color__neutral fontSize__standard fontWeight__regular transform__standardText Text__listItem Box__root borderColor__standard paddingBottom__xsmall"
33-
style="margin-left: 1.3em;"
29+
class="Bullet__root Box__root borderColor__standard paddingBottom__xsmall Text__block fontFamily__text color__neutral fontSize__standard fontWeight__regular transform__standardText Text__listItem Box__root borderColor__standard"
3430
>
3531
Bullet
3632
</li>

lib/components/BulletList/BulletList.js

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React, { Component } from 'react';
2+
import Box from '../Box/Box';
3+
4+
export default class BulletList extends Component {
5+
static displayName = 'BulletList';
6+
7+
render() {
8+
return <Box component="ul" {...this.props} />;
9+
}
10+
}

lib/components/BulletList/__snapshots__/BulletList.test.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`BulletList Theme: jobStreet Default 1`] = `
44
<ul
5-
class="Box__root borderColor__standard marginTop__none marginBottom__none paddingLeft__none reset__ul"
5+
class="Box__root borderColor__standard reset__ul"
66
>
77
<li>
88
Bullet
@@ -18,7 +18,7 @@ exports[`BulletList Theme: jobStreet Default 1`] = `
1818

1919
exports[`BulletList Theme: seekAnz Default 1`] = `
2020
<ul
21-
class="Box__root borderColor__standard marginTop__none marginBottom__none paddingLeft__none reset__ul"
21+
class="Box__root borderColor__standard reset__ul"
2222
>
2323
<li>
2424
Bullet
@@ -34,7 +34,7 @@ exports[`BulletList Theme: seekAnz Default 1`] = `
3434

3535
exports[`BulletList Theme: seekAsia Default 1`] = `
3636
<ul
37-
class="Box__root borderColor__standard marginTop__none marginBottom__none paddingLeft__none reset__ul"
37+
class="Box__root borderColor__standard reset__ul"
3838
>
3939
<li>
4040
Bullet
@@ -50,7 +50,7 @@ exports[`BulletList Theme: seekAsia Default 1`] = `
5050

5151
exports[`BulletList Theme: wireframe Default 1`] = `
5252
<ul
53-
class="Box__root borderColor__standard marginTop__none marginBottom__none paddingLeft__none reset__ul"
53+
class="Box__root borderColor__standard reset__ul"
5454
>
5555
<li>
5656
Bullet

lib/components/Text/Text.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
Theme
1212
} from '../../themes/theme';
1313

14-
interface Props extends WithThemeProps {
14+
export interface Props extends WithThemeProps {
1515
component?: ReactType;
1616
size?: FontSizeVariants;
1717
color?: ColorVariants;

0 commit comments

Comments
 (0)