From 0c96a2c837635c392080a86108e49a448131c86e Mon Sep 17 00:00:00 2001 From: siddharthkp Date: Thu, 21 May 2020 23:09:24 +0200 Subject: [PATCH 1/3] add stack children + fix copy position --- packages/docs/src/components/example.js | 7 ++-- packages/docs/src/pages/components/stack.js | 38 ++++++++++++++++++- .../react-ui/src/components/stack/index.js | 13 ++++++- 3 files changed, 53 insertions(+), 5 deletions(-) diff --git a/packages/docs/src/components/example.js b/packages/docs/src/components/example.js index df30096..075fd4d 100644 --- a/packages/docs/src/components/example.js +++ b/packages/docs/src/components/example.js @@ -96,16 +96,17 @@ const Code = ({ children, lang = 'jsx', ...props }) => { const html = highlight(dedent(children), languages[lang]) return ( - <> + {` @@ -168,7 +167,7 @@ const Documentation = () => { `} - + { } }} > - - + + + + diff --git a/packages/docs/src/pages/components/checkbox.js b/packages/docs/src/pages/components/checkbox.js index e848034..c32c25e 100644 --- a/packages/docs/src/pages/components/checkbox.js +++ b/packages/docs/src/pages/components/checkbox.js @@ -1,6 +1,6 @@ import React from 'react' import { Checkbox } from 'react-ui' -import { Table, Page, Section, Props, Badge, Example } from '../../components' +import { Page, Section, Props, Badge, Example } from '../../components' const Documentation = () => { return ( diff --git a/packages/docs/src/pages/components/link.js b/packages/docs/src/pages/components/link.js index 56a8e49..7371d4f 100644 --- a/packages/docs/src/pages/components/link.js +++ b/packages/docs/src/pages/components/link.js @@ -1,12 +1,14 @@ import React from 'react' -import { ThemeProvider, Link, Text } from 'react-ui' +import { ThemeProvider, Link, Text, Stack } from 'react-ui' import { Page, Props, Example, Section, Table, Para } from '../../components' const Documentation = () => { return ( - Extends Text. + + Extends Text. + @@ -157,7 +159,7 @@ const Documentation = () => { `} - + { } }} > - + Open GitHub repository - - + { > Open GitHub repository - + diff --git a/packages/docs/src/pages/components/skeleton.js b/packages/docs/src/pages/components/skeleton.js index c0f0205..f172e79 100644 --- a/packages/docs/src/pages/components/skeleton.js +++ b/packages/docs/src/pages/components/skeleton.js @@ -9,7 +9,7 @@ const Documentation = () => { tagline="Use a skeleton to hint that some content is on it's way" > - + @@ -34,8 +34,8 @@ const Documentation = () => {
- - + + @@ -110,8 +110,10 @@ const Documentation = () => { } }} > - - + + + + diff --git a/packages/docs/src/pages/components/spinner.js b/packages/docs/src/pages/components/spinner.js index 52b39d5..61078e8 100644 --- a/packages/docs/src/pages/components/spinner.js +++ b/packages/docs/src/pages/components/spinner.js @@ -1,5 +1,5 @@ import React from 'react' -import { ThemeProvider, Spinner, Link, Text } from 'react-ui' +import { ThemeProvider, Spinner, Link, Text, Stack } from 'react-ui' import { Page, Props, Example, Section, Table, Para } from '../../components' const Documentation = () => { @@ -98,7 +98,7 @@ const Documentation = () => { `} - + { } }} > - - + + + + diff --git a/packages/docs/src/pages/components/switch.js b/packages/docs/src/pages/components/switch.js index e910755..53a7e6e 100644 --- a/packages/docs/src/pages/components/switch.js +++ b/packages/docs/src/pages/components/switch.js @@ -1,5 +1,5 @@ import React from 'react' -import { ThemeProvider, Switch, Link, Text } from 'react-ui' +import { ThemeProvider, Switch, Link, Text, Stack } from 'react-ui' import { Page, Props, Example, Section, Table, Para } from '../../components' const Documentation = () => { @@ -123,7 +123,7 @@ const Documentation = () => { `} - + { } }} > - - + + + + diff --git a/packages/docs/src/pages/components/tabs.js b/packages/docs/src/pages/components/tabs.js index 0c795db..8550273 100644 --- a/packages/docs/src/pages/components/tabs.js +++ b/packages/docs/src/pages/components/tabs.js @@ -102,7 +102,7 @@ const Documentation = () => { + { tagline="Use Textarea to request a lot of information from user." > - Extends Input. + + Extends Input. + @@ -41,9 +43,11 @@ const Documentation = () => {
- Texarea can be used with{' '} - Form.Field which adds accessible - labels and error states. + + Texarea can be used with{' '} + Form.Field which adds + accessible labels and error states. + diff --git a/packages/docs/src/pages/components/tooltip.js b/packages/docs/src/pages/components/tooltip.js index 6c9f755..e7381a0 100644 --- a/packages/docs/src/pages/components/tooltip.js +++ b/packages/docs/src/pages/components/tooltip.js @@ -19,11 +19,15 @@ const Documentation = () => { badges={[accessible]} > - Extends{' '} - - reach-ui/tooltip - - . + + Extends{' '} + + reach-ui/tooltip + + diff --git a/packages/react-ui/src/components/skeleton/skeleton.styles.js b/packages/react-ui/src/components/skeleton/skeleton.styles.js index fd74826..cc701e6 100644 --- a/packages/react-ui/src/components/skeleton/skeleton.styles.js +++ b/packages/react-ui/src/components/skeleton/skeleton.styles.js @@ -7,6 +7,7 @@ const shine = keyframes` export const styles = { Skeleton: { + display: 'inline-block', backgroundSize: '200% 200%', animationName: `${shine}`, animationIterationCount: 'infinite', diff --git a/packages/react-ui/src/components/stack/index.js b/packages/react-ui/src/components/stack/index.js index 055b3ed..8481282 100644 --- a/packages/react-ui/src/components/stack/index.js +++ b/packages/react-ui/src/components/stack/index.js @@ -42,7 +42,7 @@ const Stack = React.forwardRef(function Stack( let children = props.children if (gap) { children = React.Children.map(props.children, (child, index) => ( - + {child} ))