Skip to content

Commit

Permalink
feat: added miniCart
Browse files Browse the repository at this point in the history
  • Loading branch information
nnnnat committed Jun 29, 2018
1 parent ba4c21b commit b17b706
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 1 deletion.
26 changes: 26 additions & 0 deletions package/src/components/MiniCart/v1/MiniCart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
import { applyTheme } from "../../../utils";

const StyledDiv = styled.div`
color: #333333;
`;

class MiniCart extends Component {
static propTypes = {

};

static defaultProps = {

};

render() {
return (
<StyledDiv>TEST</StyledDiv>
);
}
}

export default MiniCart;
3 changes: 3 additions & 0 deletions package/src/components/MiniCart/v1/MiniCart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### MiniCart

Document component here. See https://react-styleguidist.js.org/docs/documenting.html
11 changes: 11 additions & 0 deletions package/src/components/MiniCart/v1/MiniCart.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";
import renderer from "react-test-renderer";
import { shallow } from "enzyme";
import MiniCart from "./MiniCart";

test("basic snapshot", () => {
const component = renderer.create(<MiniCart />);

const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
1 change: 1 addition & 0 deletions package/src/components/MiniCart/v1/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./MiniCart";
2 changes: 1 addition & 1 deletion styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ module.exports = {
name: "Product"
}),
generateSection({
componentNames: ["CartCheckoutButton", "CartEmptyMessage", "CartSummary", "MiniCartSummary", "CartItem", "CartItems", "CartItemDetail"],
componentNames: ["CartCheckoutButton", "CartEmptyMessage", "CartSummary", "CartItem", "CartItems", "CartItemDetail", "MiniCartSummary", "MiniCart"],
content: "styleguide/src/sections/Cart.md",
name: "Cart"
}),
Expand Down

0 comments on commit b17b706

Please sign in to comment.