diff --git a/components/component-docs.json b/components/component-docs.json index 46036a7334..c0e7bb9e39 100644 --- a/components/component-docs.json +++ b/components/component-docs.json @@ -15225,6 +15225,10 @@ "type": { "name": "enum", "value": [ + { + "value": "'xx-small'", + "computed": false + }, { "value": "'x-small'", "computed": false diff --git a/components/spinner/__docs__/__snapshots__/storybook-stories.storyshot b/components/spinner/__docs__/__snapshots__/storybook-stories.storyshot index 5f65d02e95..f72843c631 100644 --- a/components/spinner/__docs__/__snapshots__/storybook-stories.storyshot +++ b/components/spinner/__docs__/__snapshots__/storybook-stories.storyshot @@ -84,6 +84,62 @@ exports[`DOM snapshots SLDSSpinner Brand Small 1`] = ` `; +exports[`DOM snapshots SLDSSpinner Brand X-Small 1`] = ` +
+
+
+ + Loading... + +
+
+
+
+
+`; + +exports[`DOM snapshots SLDSSpinner Brand Xx-Small 1`] = ` +
+
+
+ + Loading... + +
+
+
+
+
+`; + exports[`DOM snapshots SLDSSpinner Docs site Default 1`] = `
`; +exports[`DOM snapshots SLDSSpinner Inverse X-Small 1`] = ` +
+
+
+
+ + Loading... + +
+
+
+
+
+
+`; + +exports[`DOM snapshots SLDSSpinner Inverse Xx-Small 1`] = ` +
+
+
+
+ + Loading... + +
+
+
+
+
+
+`; + exports[`DOM snapshots SLDSSpinner Large 1`] = `
`; + +exports[`DOM snapshots SLDSSpinner X-Small 1`] = ` +
+
+
+ + Main Frame Loading... + +
+
+
+
+
+`; + +exports[`DOM snapshots SLDSSpinner Xx-Small 1`] = ` +
+
+
+ + Main Frame Loading... + +
+
+
+
+
+`; diff --git a/components/spinner/__docs__/storybook-stories.jsx b/components/spinner/__docs__/storybook-stories.jsx index a0b0d42b02..3573227420 100644 --- a/components/spinner/__docs__/storybook-stories.jsx +++ b/components/spinner/__docs__/storybook-stories.jsx @@ -24,6 +24,24 @@ storiesOf(SPINNER, module) {getStory()}
)) + .add('Xx-Small', () => + getSpinner({ + size: 'xx-small', + variant: 'base', + assistiveText: { + label: 'Main Frame Loading...', + }, + }) + ) + .add('X-Small', () => + getSpinner({ + size: 'x-small', + variant: 'base', + assistiveText: { + label: 'Main Frame Loading...', + }, + }) + ) .add('Small', () => getSpinner({ size: 'small', @@ -45,6 +63,18 @@ storiesOf(SPINNER, module) variant: 'base', }) ) + .add('Brand Xx-Small', () => + getSpinner({ + size: 'xx-small', + variant: 'brand', + }) + ) + .add('Brand X-Small', () => + getSpinner({ + size: 'x-small', + variant: 'brand', + }) + ) .add('Brand Small', () => getSpinner({ size: 'small', @@ -71,6 +101,24 @@ storiesOf(SPINNER, module) isDelayed: true, }) ) + .add( + 'Inverse Xx-Small', + () => + getSpinner({ + size: 'xx-small', + variant: 'inverse', + }), + { decorators: [inverseContainer] } + ) + .add( + 'Inverse X-Small', + () => + getSpinner({ + size: 'x-small', + variant: 'inverse', + }), + { decorators: [inverseContainer] } + ) .add( 'Inverse Small', () => diff --git a/components/spinner/index.jsx b/components/spinner/index.jsx index 68b58aaa03..1d1e9992b8 100644 --- a/components/spinner/index.jsx +++ b/components/spinner/index.jsx @@ -51,7 +51,7 @@ const propTypes = { /** * Determines the size of the spinner */ - size: PropTypes.oneOf(['x-small', 'small', 'medium', 'large']), + size: PropTypes.oneOf(['xx-small', 'x-small', 'small', 'medium', 'large']), /** * Determines the color of the spinner: `base` is gray, `brand` is blue, and `inverse` is white. */ diff --git a/utilities/warning/if-one-then-both-required-property.js b/utilities/warning/if-one-then-both-required-property.js index a7b433e08e..e310ca6800 100644 --- a/utilities/warning/if-one-then-both-required-property.js +++ b/utilities/warning/if-one-then-both-required-property.js @@ -6,7 +6,7 @@ // This function will deliver an error message to the browser console one property is used but not both that are required. Either use neither or both properties. import warning from 'warning'; -let ifOneThenBothRequiredProperty = function ifOneThenBothRequiredPropertyFunction() {}; +let ifOneThenBothRequiredProperty; if (process.env.NODE_ENV !== 'production') { const hasWarned = {}; diff --git a/utilities/warning/one-of-required-property.js b/utilities/warning/one-of-required-property.js index b1ffdcdea1..3ea1b01cf7 100644 --- a/utilities/warning/one-of-required-property.js +++ b/utilities/warning/one-of-required-property.js @@ -6,7 +6,7 @@ // This function will deliver an error message to the browser console when all of the props passed in are undefined (falsey). import warning from 'warning'; -let oneOfRequired = function oneOfRequiredFunction() {}; +let oneOfRequired; if (process.env.NODE_ENV !== 'production') { const hasWarned = {};