diff --git a/docs/src/App/App.tsx b/docs/src/App/App.tsx
index e120c2f29de..ca35539f49b 100644
--- a/docs/src/App/App.tsx
+++ b/docs/src/App/App.tsx
@@ -9,7 +9,7 @@ import ComponentRoute from './ComponentRoute/ComponentRoute';
import { Link, ExternalLink } from './Link';
import styles from './App.css.js';
-const { ThemeProvider, Text, Box, BulletList, Bullet } = components;
+const { ThemeProvider, Text, Box, BulletList, Bullet, Hidden } = components;
interface AppProps extends RouteComponentProps {
sourceUrlPrefix: string;
@@ -59,122 +59,126 @@ export default withRouter(
-
+
+
+
-
-
+
-
-
- Tools
-
-
-
-
-
-
- Source
-
-
-
-
- Playroom
-
-
-
-
-
-
- Components
-
-
-
+
+
+
+ Tools
+
+
+
+
+
+
+ Source
+
+
+
+
+ Playroom
+
+
+
+
+
+
+ Components
+
+
+
+
+ {Object.keys(components)
+ .filter(x => !/icon/i.test(x))
+ .sort()
+ .map(componentName => (
+
+
+ {componentName}
+
+
+ ))}
+
+
+
+
+ Icons
+
+
{Object.keys(components)
- .filter(x => !/icon/i.test(x))
+ .filter(x => /icon/i.test(x) && x !== 'Icon')
.sort()
- .map(componentName => (
-
+ .map(iconName => (
+
- {componentName}
+ {iconName}
))}
-
-
- Icons
-
-
-
- {Object.keys(components)
- .filter(x => /icon/i.test(x) && x !== 'Icon')
- .sort()
- .map(iconName => (
-
-
- {iconName}
-
-
- ))}
-
-
-
+
+
(
+
+ The following line is hidden on mobile:
+
+ Hidden on mobile.
+
+
+ )
+ },
+ {
+ label: 'Hidden on Desktop',
+ render: () => (
+
+ The following line is hidden on desktop:
+
+ Hidden on desktop.
+
+
+ )
+ },
+ {
+ label: 'Hidden on Print',
+ render: () => (
+
+ The following line is hidden on print:
+
+ Hidden on print.
+
+
+ )
+ },
+ {
+ label: 'Hidden on Screen',
+ render: () => (
+
+ The following line is hidden on screen:
+
+ Hidden on screen.
+
+
+ )
+ },
+ {
+ label: 'Hidden on Mobile (Inline)',
+ render: () => (
+
+ The following text node is hidden on mobile:{' '}
+
+ Hidden on mobile.
+
+
+ )
+ },
+ {
+ label: 'Hidden on Desktop (Inline)',
+ render: () => (
+
+ The following text node is hidden on desktop:{' '}
+
+ Hidden on desktop.
+
+
+ )
+ },
+ {
+ label: 'Hidden on Print (Inline)',
+ render: () => (
+
+ The following text node is hidden on print:{' '}
+
+ Hidden on print.
+
+
+ )
+ },
+ {
+ label: 'Hidden on Screen (Inline)',
+ render: () => (
+
+ The following text node is hidden on screen:{' '}
+
+ Hidden on screen.
+
+
+ )
+ }
+ ]
+};
diff --git a/lib/components/Hidden/Hidden.tsx b/lib/components/Hidden/Hidden.tsx
new file mode 100644
index 00000000000..2f2500a24e3
--- /dev/null
+++ b/lib/components/Hidden/Hidden.tsx
@@ -0,0 +1,42 @@
+import React, { Component, ReactNode } from 'react';
+import Box from '../Box/Box';
+import styles from './Hidden.css.js';
+
+export interface HiddenProps {
+ children: ReactNode;
+ mobile?: boolean;
+ desktop?: boolean;
+ screen?: boolean;
+ print?: boolean;
+ inline?: boolean;
+}
+
+export default class Hidden extends Component {
+ static displayName = 'Hidden';
+
+ render() {
+ const {
+ children,
+ inline = false,
+ mobile: hiddenOnMobile = false,
+ desktop: hiddenOnDesktop = false,
+ screen: hiddenOnScreen = false,
+ print: hiddenOnPrint = false
+ } = this.props;
+
+ const display = inline ? 'inline' : 'block';
+
+ return (
+
+ {children}
+
+ );
+ }
+}
diff --git a/lib/components/index.ts b/lib/components/index.ts
index f7e71e8b7d9..2038dea58d2 100644
--- a/lib/components/index.ts
+++ b/lib/components/index.ts
@@ -17,6 +17,7 @@ export { default as Divider } from './Divider/Divider';
export { default as FieldLabel } from './FieldLabel/FieldLabel';
export { default as FieldMessage } from './FieldMessage/FieldMessage';
export { default as Heading } from './Heading/Heading';
+export { default as Hidden } from './Hidden/Hidden';
export { default as Radio } from './Radio/Radio';
export { default as Reset } from './Reset/Reset';
export { default as Strong } from './Strong/Strong';