Skip to content

Commit

Permalink
fix: tabs typo and add variant classname (#117)
Browse files Browse the repository at this point in the history
* feat(tabs): status style use css instead of js

* feat(pagination): add custom classname

* feat: merge conflict

* fix: fix tabs typo and add variant classname

Co-authored-by: Angelia <angelia@Angelia-MBP.lan>
Co-authored-by: Angelia <angelia@Angelia-MacBook-Pro.local>
  • Loading branch information
3 people authored Oct 16, 2020
1 parent 38167e8 commit ffe59d7
Show file tree
Hide file tree
Showing 20 changed files with 88 additions and 88 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Card Footer should render correctly 1`] = `
"<div class=\\"card \\"><div class=\\"content \\"><p>card</p><style>
"<div class=\\"card solid\\"><div class=\\"content \\"><p>card</p><style>
.content {
width: 100%;
padding: 1.1429rem 1.1429rem;
Expand Down
74 changes: 37 additions & 37 deletions components/card/__tests__/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`Card should render correctly when nested 1`] = `
initialize {
"0": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand All @@ -14,7 +14,7 @@ initialize {
"children": Array [
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand All @@ -24,7 +24,7 @@ initialize {
"children": Array [
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -375,7 +375,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -763,7 +763,7 @@ initialize {
"children": Array [
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -1114,7 +1114,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -1501,7 +1501,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand All @@ -1511,7 +1511,7 @@ initialize {
"children": Array [
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -1862,7 +1862,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -2250,7 +2250,7 @@ initialize {
"children": Array [
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -2601,7 +2601,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -3025,7 +3025,7 @@ initialize {
"children": Array [
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand All @@ -3035,7 +3035,7 @@ initialize {
"children": Array [
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -3386,7 +3386,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -3774,7 +3774,7 @@ initialize {
"children": Array [
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -4125,7 +4125,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -4512,7 +4512,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand All @@ -4522,7 +4522,7 @@ initialize {
"children": Array [
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -4873,7 +4873,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -5261,7 +5261,7 @@ initialize {
"children": Array [
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -5612,7 +5612,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -6005,7 +6005,7 @@ initialize {
"children": Array [
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -6285,7 +6285,7 @@ initialize {
"namespace": "http://www.w3.org/1999/xhtml",
"next": Object {
"attribs": Object {
"class": "card ",
"class": "card line",
},
"children": Array [
Object {
Expand Down Expand Up @@ -6565,7 +6565,7 @@ initialize {
"namespace": "http://www.w3.org/1999/xhtml",
"next": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -6845,7 +6845,7 @@ initialize {
"namespace": "http://www.w3.org/1999/xhtml",
"next": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -7166,7 +7166,7 @@ initialize {
},
Object {
"attribs": Object {
"class": "card ",
"class": "card line",
},
"children": Array [
Object {
Expand Down Expand Up @@ -7446,7 +7446,7 @@ initialize {
"namespace": "http://www.w3.org/1999/xhtml",
"next": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -7726,7 +7726,7 @@ initialize {
"namespace": "http://www.w3.org/1999/xhtml",
"next": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -8028,7 +8028,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -8327,7 +8327,7 @@ initialize {
},
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -8607,7 +8607,7 @@ initialize {
"namespace": "http://www.w3.org/1999/xhtml",
"next": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -8899,7 +8899,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card line",
},
"children": Array [
Object {
Expand Down Expand Up @@ -9181,7 +9181,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -9488,7 +9488,7 @@ initialize {
},
Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -9770,7 +9770,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down Expand Up @@ -10052,7 +10052,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card line",
},
"children": Array [
Object {
Expand Down Expand Up @@ -10334,7 +10334,7 @@ initialize {
"parent": [Circular],
"prev": Object {
"attribs": Object {
"class": "card ",
"class": "card solid",
},
"children": Array [
Object {
Expand Down
2 changes: 1 addition & 1 deletion components/card/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const Card: React.FC<React.PropsWithChildren<CardProps>> = ({
const hasContent = hasChild(withoutImageChildren, CardContent)

return (
<div className={`card ${className}`} {...props}>
<div className={`card ${className} ${variant || 'solid'}`} {...props}>
{imageChildren}
{hasContent ? withoutImageChildren : <CardContent>{withoutImageChildren}</CardContent>}
{footerChildren}
Expand Down
4 changes: 2 additions & 2 deletions components/modal/__tests__/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Modal customization should be supported 1`] = `
"<div class=\\"wrapper test-class wrapper-enter\\"><h2 class=\\"\\">Modal</h2><style>
"<div class=\\"wrapper modal test-class wrapper-enter\\"><h2 class=\\"\\">Modal</h2><style>
h2 {
font-size: 1.2857rem;
line-height: 1.7857rem;
Expand Down Expand Up @@ -61,7 +61,7 @@ exports[`Modal customization should be supported 1`] = `
`;
exports[`Modal should render correctly 1`] = `
"<div class=\\"backdrop transition-enter\\"><div class=\\"layer\\"></div><div class=\\"content\\"><div class=\\"wrapper wrapper-enter\\"><h2 class=\\"\\">Modal</h2><style>
"<div class=\\"backdrop transition-enter\\"><div class=\\"layer\\"></div><div class=\\"content\\"><div class=\\"wrapper modal wrapper-enter\\"><h2 class=\\"\\">Modal</h2><style>
h2 {
font-size: 1.2857rem;
line-height: 1.7857rem;
Expand Down
2 changes: 1 addition & 1 deletion components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const Modal = forwardRef<ModalHandles, ModalProps>(
return createPortal(
<ModalContext.Provider value={modalConfig}>
<Backdrop onClick={closeFromBackdrop} visible={visible}>
<ModalWrapper visible={visible} className={wrapClassName} width={wrapperWidth}>
<ModalWrapper visible={visible} className={`modal ${wrapClassName}`} width={wrapperWidth}>
{closable && (
<ModalIcon size={16} color={theme.palette.cNeutral5} onClick={closeModal} />
)}
Expand Down
Loading

0 comments on commit ffe59d7

Please sign in to comment.