`s. ([IconText](#mbxicontext) is
* inline-level.)
*/
children: PropTypes.node.isRequired,
@@ -245,10 +245,10 @@ MbxButton.propTypes = {
component: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
};
-MbxButton.defaultProps = {
+Button.defaultProps = {
variant: 'primary',
block: false,
transformClasses: x => x
};
-export default MbxButton;
+export default Button;
diff --git a/src/components/mbx-button/examples/mbx-button-a.js b/src/components/button/examples/button-a.js
similarity index 53%
rename from src/components/mbx-button/examples/mbx-button-a.js
rename to src/components/button/examples/button-a.js
index ad1dbd9e..05b672eb 100644
--- a/src/components/mbx-button/examples/mbx-button-a.js
+++ b/src/components/button/examples/button-a.js
@@ -2,39 +2,39 @@
All the standard variants.
*/
import React from 'react';
-import MbxButton from '../mbx-button';
+import Button from '../button';
export default class Example extends React.Component {
render() {
return (
- Primary
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
);
diff --git a/src/components/button/examples/button-b.js b/src/components/button/examples/button-b.js
new file mode 100644
index 00000000..337bea24
--- /dev/null
+++ b/src/components/button/examples/button-b.js
@@ -0,0 +1,16 @@
+/*
+A slightly wider, outlined button with an alternate color, using [IconText](#mbxicontext) to prefix the text with an icon.
+*/
+import React from 'react';
+import Button from '../button';
+import IconText from '../../icon-text';
+
+export default class Example extends React.Component {
+ render() {
+ return (
+
+ );
+ }
+}
diff --git a/src/components/mbx-button/examples/mbx-button-c.js b/src/components/button/examples/button-c.js
similarity index 80%
rename from src/components/mbx-button/examples/mbx-button-c.js
rename to src/components/button/examples/button-c.js
index 84614546..ea822dd9 100644
--- a/src/components/mbx-button/examples/mbx-button-c.js
+++ b/src/components/button/examples/button-c.js
@@ -6,7 +6,7 @@ The additional prop `data-test` is passed on directly to the `
`.
Also, `transformClasses` is used to add the drop-shadow class.
*/
import React from 'react';
-import MbxButton from '../mbx-button';
+import Button from '../button';
export default class Example extends React.Component {
render() {
@@ -14,15 +14,15 @@ export default class Example extends React.Component {
return `${variantClasses} shadow-darken25`;
};
return (
-
-
+
+
);
}
diff --git a/src/components/mbx-button/examples/mbx-button-d.js b/src/components/button/examples/button-d.js
similarity index 74%
rename from src/components/mbx-button/examples/mbx-button-d.js
rename to src/components/button/examples/button-d.js
index ce068967..26ea9701 100644
--- a/src/components/mbx-button/examples/mbx-button-d.js
+++ b/src/components/button/examples/button-d.js
@@ -5,7 +5,7 @@ wrapper container with an Assembly width class.
Sometimes, for example, you might want a column or row of equal-width buttons.
*/
import React from 'react';
-import MbxButton from '../mbx-button';
+import Button from '../button';
export default class Example extends React.Component {
render() {
@@ -13,51 +13,51 @@ export default class Example extends React.Component {
-
+
+
-
+
+
-
+
+
diff --git a/src/components/button/index.js b/src/components/button/index.js
new file mode 100644
index 00000000..ec63ae79
--- /dev/null
+++ b/src/components/button/index.js
@@ -0,0 +1,3 @@
+import main from './button';
+
+export default main;
diff --git a/src/components/mbx-icon-text/__tests__/__snapshots__/mbx-icon-text.test.js.snap b/src/components/icon-text/__tests__/__snapshots__/icon-text.test.js.snap
similarity index 100%
rename from src/components/mbx-icon-text/__tests__/__snapshots__/mbx-icon-text.test.js.snap
rename to src/components/icon-text/__tests__/__snapshots__/icon-text.test.js.snap
diff --git a/src/components/mbx-icon-text/__tests__/mbx-icon-text-test-cases.js b/src/components/icon-text/__tests__/icon-text-test-cases.js
similarity index 79%
rename from src/components/mbx-icon-text/__tests__/mbx-icon-text-test-cases.js
rename to src/components/icon-text/__tests__/icon-text-test-cases.js
index 986cb41b..66443e5d 100644
--- a/src/components/mbx-icon-text/__tests__/mbx-icon-text-test-cases.js
+++ b/src/components/icon-text/__tests__/icon-text-test-cases.js
@@ -1,12 +1,12 @@
import React from 'react';
-import MbxIconText from '../mbx-icon-text';
+import IconText from '../icon-text';
import Icon from '../../icon';
const testCases = {};
testCases.iconBefore = {
description: 'icon before',
- component: MbxIconText,
+ component: IconText,
props: {
children: 'Copy',
iconBefore: 'clipboard'
@@ -15,7 +15,7 @@ testCases.iconBefore = {
testCases.iconAfter = {
description: 'icon after',
- component: MbxIconText,
+ component: IconText,
props: {
children: 'Next',
iconAfter: 'chevron-right'
@@ -24,7 +24,7 @@ testCases.iconAfter = {
testCases.largeSpacing = {
description: 'large spacing',
- component: MbxIconText,
+ component: IconText,
props: {
children: 'Done',
iconBefore: 'check',
@@ -34,7 +34,7 @@ testCases.largeSpacing = {
testCases.bothIcons = {
description: 'icons on both sides, including a non-string one',
- component: MbxIconText,
+ component: IconText,
props: {
children: 'What',
iconBefore: 'check',
@@ -46,7 +46,7 @@ testCases.buttonyDisplay = {
description: 'a buttony look',
element: (
)
};
diff --git a/src/components/mbx-icon-text/__tests__/mbx-icon-text.test.js b/src/components/icon-text/__tests__/icon-text.test.js
similarity index 95%
rename from src/components/mbx-icon-text/__tests__/mbx-icon-text.test.js
rename to src/components/icon-text/__tests__/icon-text.test.js
index 4f8234f3..3b3ab5df 100644
--- a/src/components/mbx-icon-text/__tests__/mbx-icon-text.test.js
+++ b/src/components/icon-text/__tests__/icon-text.test.js
@@ -1,6 +1,6 @@
import React from 'react';
import { shallow } from 'enzyme';
-import { testCases } from './mbx-icon-text-test-cases';
+import { testCases } from './icon-text-test-cases';
let testCase;
let wrapper;
diff --git a/src/components/mbx-icon-text/examples/mbx-icon-text-a.js b/src/components/icon-text/examples/icon-text-a.js
similarity index 71%
rename from src/components/mbx-icon-text/examples/mbx-icon-text-a.js
rename to src/components/icon-text/examples/icon-text-a.js
index 0c447356..13d3e467 100644
--- a/src/components/mbx-icon-text/examples/mbx-icon-text-a.js
+++ b/src/components/icon-text/examples/icon-text-a.js
@@ -2,13 +2,13 @@
The standard button-without-a-background look. Also useful for menu items.
*/
import React from 'react';
-import MbxIconText from '../mbx-icon-text';
+import IconText from '../icon-text';
export default class Example extends React.Component {
render() {
return (
);
}
diff --git a/src/components/mbx-icon-text/examples/mbx-icon-text-b.js b/src/components/icon-text/examples/icon-text-b.js
similarity index 65%
rename from src/components/mbx-icon-text/examples/mbx-icon-text-b.js
rename to src/components/icon-text/examples/icon-text-b.js
index 08ad0ec1..ad4e7b77 100644
--- a/src/components/mbx-icon-text/examples/mbx-icon-text-b.js
+++ b/src/components/icon-text/examples/icon-text-b.js
@@ -2,13 +2,13 @@
Go see the next thing!
*/
import React from 'react';
-import MbxIconText from '../mbx-icon-text';
+import IconText from '../icon-text';
export default class Example extends React.Component {
render() {
return (
);
}
diff --git a/src/components/mbx-icon-text/mbx-icon-text.js b/src/components/icon-text/icon-text.js
similarity index 93%
rename from src/components/mbx-icon-text/mbx-icon-text.js
rename to src/components/icon-text/icon-text.js
index ae66add4..4768b462 100644
--- a/src/components/mbx-icon-text/mbx-icon-text.js
+++ b/src/components/icon-text/icon-text.js
@@ -7,7 +7,7 @@ import Icon from '../icon';
*
* The icon and text will be vertically centered, with standard spacing between.
*/
-class MbxIconText extends React.Component {
+class IconText extends React.Component {
renderIcon(icon) {
if (typeof icon === 'string') {
return ;
@@ -41,7 +41,7 @@ class MbxIconText extends React.Component {
}
}
-MbxIconText.propTypes = {
+IconText.propTypes = {
/**
* The text. A string is recommended, but you can put an element in here if
* you think it's right. If you do, it should be inline-level,
@@ -64,8 +64,8 @@ MbxIconText.propTypes = {
iconAfter: PropTypes.oneOfType([PropTypes.node, PropTypes.string])
};
-MbxIconText.defaultProps = {
+IconText.defaultProps = {
spacing: 'small'
};
-export default MbxIconText;
+export default IconText;
diff --git a/src/components/icon-text/index.js b/src/components/icon-text/index.js
new file mode 100644
index 00000000..84cde856
--- /dev/null
+++ b/src/components/icon-text/index.js
@@ -0,0 +1,3 @@
+import main from './icon-text';
+
+export default main;
diff --git a/src/components/mbx-button/examples/mbx-button-b.js b/src/components/mbx-button/examples/mbx-button-b.js
deleted file mode 100644
index c81944ba..00000000
--- a/src/components/mbx-button/examples/mbx-button-b.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-A slightly wider, outlined button with an alternate color, using [MbxIconText](#mbxicontext) to prefix the text with an icon.
-*/
-import React from 'react';
-import MbxButton from '../mbx-button';
-import MbxIconText from '../../mbx-icon-text';
-
-export default class Example extends React.Component {
- render() {
- return (
- {}} width="large" outline={true} color="purple">
- Save your map
-
- );
- }
-}
diff --git a/src/components/mbx-button/index.js b/src/components/mbx-button/index.js
deleted file mode 100644
index f5a42cc3..00000000
--- a/src/components/mbx-button/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import main from './mbx-button';
-
-export default main;
diff --git a/src/components/mbx-icon-text/index.js b/src/components/mbx-icon-text/index.js
deleted file mode 100644
index 7fef3004..00000000
--- a/src/components/mbx-icon-text/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import main from './mbx-icon-text';
-
-export default main;
diff --git a/src/components/mbx-underline-tabs/index.js b/src/components/mbx-underline-tabs/index.js
deleted file mode 100644
index b96b53ae..00000000
--- a/src/components/mbx-underline-tabs/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import main from './mbx-underline-tabs';
-
-export default main;
diff --git a/src/components/mbx-underline-tabs/__tests__/__snapshots__/mbx-underline-tabs.test.js.snap b/src/components/underline-tabs/__tests__/__snapshots__/underline-tabs.test.js.snap
similarity index 99%
rename from src/components/mbx-underline-tabs/__tests__/__snapshots__/mbx-underline-tabs.test.js.snap
rename to src/components/underline-tabs/__tests__/__snapshots__/underline-tabs.test.js.snap
index 7f426dbb..3737cd1e 100644
--- a/src/components/mbx-underline-tabs/__tests__/__snapshots__/mbx-underline-tabs.test.js.snap
+++ b/src/components/underline-tabs/__tests__/__snapshots__/underline-tabs.test.js.snap
@@ -289,7 +289,7 @@ exports[`large links with icons renders as expected 1`] = `
- MbxIconText
+ IconText
- MbxIconText
+ IconText
@@ -344,7 +344,7 @@ exports[`large links with icons renders as expected 1`] = `
- MbxIconText
+ IconText
diff --git a/src/components/mbx-underline-tabs/__tests__/mbx-underline-tabs-test-cases.js b/src/components/underline-tabs/__tests__/underline-tabs-test-cases.js
similarity index 87%
rename from src/components/mbx-underline-tabs/__tests__/mbx-underline-tabs-test-cases.js
rename to src/components/underline-tabs/__tests__/underline-tabs-test-cases.js
index 92ead6b7..71561df3 100644
--- a/src/components/mbx-underline-tabs/__tests__/mbx-underline-tabs-test-cases.js
+++ b/src/components/underline-tabs/__tests__/underline-tabs-test-cases.js
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
-import MbxIconText from '../../mbx-icon-text';
-import MbxUnderlineTabs from '../mbx-underline-tabs';
+import IconText from '../../icon-text';
+import UnderlineTabs from '../underline-tabs';
import safeSpy from '../../../test-utils/safe-spy';
const testCases = {};
@@ -36,7 +36,7 @@ class InteractiveDemo extends React.Component {
return (
-
Disk,
+ label: Disk,
href: '#'
},
{
id: 'B',
- label: Alert,
+ label: Alert,
href: '#'
},
{
id: 'C',
- label: Book,
+ label: Book,
href: '#'
}
],
@@ -229,7 +229,7 @@ testCases.largeLinksIcons = {
testCases.customized = {
description: 'customized',
- component: MbxUnderlineTabs,
+ component: UnderlineTabs,
props: {
items: [
{
@@ -257,7 +257,7 @@ testCases.customized = {
testCases.idLabelsAndDisabledItem = {
description: 'ID labels and a disabled item',
- component: MbxUnderlineTabs,
+ component: UnderlineTabs,
props: {
items: [
{
diff --git a/src/components/mbx-underline-tabs/__tests__/mbx-underline-tabs.test.js b/src/components/underline-tabs/__tests__/underline-tabs.test.js
similarity index 94%
rename from src/components/mbx-underline-tabs/__tests__/mbx-underline-tabs.test.js
rename to src/components/underline-tabs/__tests__/underline-tabs.test.js
index 5ab48b7c..da844734 100644
--- a/src/components/mbx-underline-tabs/__tests__/mbx-underline-tabs.test.js
+++ b/src/components/underline-tabs/__tests__/underline-tabs.test.js
@@ -1,11 +1,11 @@
/* eslint-disable react/display-name */
import React from 'react';
import { mount } from 'enzyme';
-import { testCases } from './mbx-underline-tabs-test-cases';
+import { testCases } from './underline-tabs-test-cases';
-jest.mock('../../mbx-icon-text', () => () => 'MbxIconText');
+jest.mock('../../icon-text', () => () => 'IconText');
-// Using Enzyme's mount instead of shallow in order to test MbxUnderlineTabItem
+// Using Enzyme's mount instead of shallow in order to test UnderlineTabItem
// at the same time, since its independent existence is an implementation
// detail that may change.
diff --git a/src/components/mbx-underline-tabs/examples/mbx-underline-tabs-a.js b/src/components/underline-tabs/examples/underline-tabs-a.js
similarity index 77%
rename from src/components/mbx-underline-tabs/examples/mbx-underline-tabs-a.js
rename to src/components/underline-tabs/examples/underline-tabs-a.js
index c6536acc..416da203 100644
--- a/src/components/mbx-underline-tabs/examples/mbx-underline-tabs-a.js
+++ b/src/components/underline-tabs/examples/underline-tabs-a.js
@@ -2,7 +2,7 @@
Standard usage.
*/
import React from 'react';
-import MbxUnderlineTabs from '../mbx-underline-tabs';
+import UnderlineTabs from '../underline-tabs';
const items = [
{
@@ -20,7 +20,7 @@ const items = [
{
label: 'Link here',
id: 'link',
- href: '#mbx-underline-tabs-a'
+ href: '#underline-tabs-a'
}
];
@@ -35,8 +35,8 @@ export default class Example extends React.Component {
render() {
return (
-