diff --git a/packages/docs/src/components/example.js b/packages/docs/src/components/example.js index df30096..498439a 100644 --- a/packages/docs/src/components/example.js +++ b/packages/docs/src/components/example.js @@ -102,7 +102,7 @@ const Code = ({ children, lang = 'jsx', ...props }) => { css={{ position: 'absolute', right: 0, - top: '10px', + top: 0, svg: { color: copied ? '#38C172' : '#929FB1' }, ':hover, :focus': { svg: { color: copied ? '#38C172' : '#c6cbd1' } } }} diff --git a/packages/docs/src/pages/components/alert.js b/packages/docs/src/pages/components/alert.js index 19fce8d..790a291 100644 --- a/packages/docs/src/pages/components/alert.js +++ b/packages/docs/src/pages/components/alert.js @@ -1,6 +1,6 @@ import React from 'react' -import { ThemeProvider, Alert, Link, Text } from 'react-ui' +import { ThemeProvider, Alert, Link, Text, Stack } from 'react-ui' import { Page, @@ -126,7 +126,7 @@ const Documentation = () => { You did the thing! `} - + { } }} > - You should pay attention - You did the thing! + + You should pay attention + You did the thing! + diff --git a/packages/docs/src/pages/components/button.js b/packages/docs/src/pages/components/button.js index d3bff34..a6d7dc2 100644 --- a/packages/docs/src/pages/components/button.js +++ b/packages/docs/src/pages/components/button.js @@ -1,5 +1,5 @@ import React from 'react' -import { ThemeProvider, Button, Link, Text } from 'react-ui' +import { ThemeProvider, Stack, Button, Link, Text } from 'react-ui' import { Page, Section, @@ -57,7 +57,6 @@ const Documentation = () => {
- {` @@ -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/stack.js b/packages/docs/src/pages/components/stack.js index b578e48..11d93c2 100644 --- a/packages/docs/src/pages/components/stack.js +++ b/packages/docs/src/pages/components/stack.js @@ -1,6 +1,6 @@ import React from 'react' import { Avatar, Link, Stack, Text, Input, Button } from 'react-ui' -import { Page, Props, Example, Section, Badge } from '../../components' +import { Page, Props, Para, Example, Section, Badge } from '../../components' const Documentation = () => { return ( @@ -198,6 +198,42 @@ const Documentation = () => { `} + + + + Based on the{' '} + + working draft for flex gap + + , margin on the child element is added to the gap. + + + + + + + + + + + {` + + + + + + `} +
) 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 04f5eba..8481282 100644 --- a/packages/react-ui/src/components/stack/index.js +++ b/packages/react-ui/src/components/stack/index.js @@ -39,6 +39,15 @@ const Stack = React.forwardRef(function Stack( styles['> * + *'] = createGap(direction, gap) } + let children = props.children + if (gap) { + children = React.Children.map(props.children, (child, index) => ( + + {child} + + )) + } + return ( + > + {children} + ) })