Skip to content

Commit af0ab66

Browse files
committed
made 5 components with single theme dependent styles
1 parent 6c88c15 commit af0ab66

File tree

1 file changed

+11
-43
lines changed

1 file changed

+11
-43
lines changed

src/index.js

Lines changed: 11 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,14 @@
1-
// import Button from './button';
2-
// import Card from './card';
3-
// import Checkbox from './checkbox';
4-
// import CheckboxGroup from './checkboxGroup';
5-
// import Toggle from './toggle';
6-
7-
// export default {
8-
// Button,
9-
// Card,
10-
// Checkbox,
11-
// CheckboxGroup,
12-
// Toggle,
13-
// };
14-
15-
import React from 'react';
16-
import ReactDOM from 'react-dom';
1+
import Button from './button';
2+
import Card from './card';
3+
import Checkbox from './checkbox';
4+
import CheckboxGroup from './checkboxGroup';
175
import Toggle from './toggle';
18-
import themes from './theme.scss';
19-
20-
class ToggleDisplay extends React.Component {
21-
constructor(props) {
22-
super(props);
23-
24-
this.state = {
25-
toggled: false,
26-
};
27-
}
28-
29-
handleToggle = () => {
30-
this.setState({
31-
toggled: !this.state.toggled,
32-
});
33-
}
346

35-
render() {
36-
return (
37-
<Toggle
38-
toggled={this.state.toggled}
39-
onClick={this.handleToggle}
40-
theme={themes}
41-
/>
42-
);
43-
}
44-
}
7+
export default {
8+
Button,
9+
Card,
10+
Checkbox,
11+
CheckboxGroup,
12+
Toggle,
13+
};
4514

46-
ReactDOM.render(<ToggleDisplay />, document.getElementById('index'));

0 commit comments

Comments
 (0)