diff --git a/sandbox/grommet-app/src/components/ContentPane/index.jsx b/sandbox/grommet-app/src/components/ContentPane/index.jsx index f423c15eb..21824ba79 100644 --- a/sandbox/grommet-app/src/components/ContentPane/index.jsx +++ b/sandbox/grommet-app/src/components/ContentPane/index.jsx @@ -55,10 +55,4 @@ ContentPane.propTypes = { ]), }; -ContentPane.defaultProps = { - actions: undefined, - contain: undefined, - skeleton: undefined, -}; - export default ContentPane; diff --git a/sandbox/grommet-app/src/pages/sticker-sheet/components/Compare.jsx b/sandbox/grommet-app/src/pages/sticker-sheet/components/Compare.jsx new file mode 100644 index 000000000..e6bfe0ffb --- /dev/null +++ b/sandbox/grommet-app/src/pages/sticker-sheet/components/Compare.jsx @@ -0,0 +1,69 @@ +import React, { useContext } from 'react'; +import PropTypes from 'prop-types'; +import { Box, Grommet, Stack, ThemeContext } from 'grommet'; +import { hpe } from 'grommet-theme-hpe'; +import { current as hpeCurrent } from '../../../themes/theme'; +import { ModeContext } from './ModeContext'; + +export const Compare = ({ children, ...rest }) => { + const { mode, direction } = React.useContext(ModeContext); + const theme = useContext(ThemeContext); + + if (direction === 'row') { + return ( + + + {children} + + + {children} + + + ); + } + + return ( + + + + {children} + + + + + + {children} + + + + ); +}; + +Compare.propTypes = { + children: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.array, + PropTypes.element, + ]), +}; diff --git a/sandbox/grommet-app/src/pages/sticker-sheet/components/ModeContext.jsx b/sandbox/grommet-app/src/pages/sticker-sheet/components/ModeContext.jsx new file mode 100644 index 000000000..6f5f8014d --- /dev/null +++ b/sandbox/grommet-app/src/pages/sticker-sheet/components/ModeContext.jsx @@ -0,0 +1,3 @@ +import React from 'react'; + +export const ModeContext = React.createContext({}); diff --git a/sandbox/grommet-app/src/pages/sticker-sheet/components/StyleInProgress.jsx b/sandbox/grommet-app/src/pages/sticker-sheet/components/StyleInProgress.jsx new file mode 100644 index 000000000..1fb647dd5 --- /dev/null +++ b/sandbox/grommet-app/src/pages/sticker-sheet/components/StyleInProgress.jsx @@ -0,0 +1,9 @@ +import { Notification } from 'grommet'; + +export const StyleInProgress = () => ( + +); diff --git a/sandbox/grommet-app/src/pages/sticker-sheet/components/TabContent.jsx b/sandbox/grommet-app/src/pages/sticker-sheet/components/TabContent.jsx new file mode 100644 index 000000000..c72d79d01 --- /dev/null +++ b/sandbox/grommet-app/src/pages/sticker-sheet/components/TabContent.jsx @@ -0,0 +1,14 @@ +import PropTypes from 'prop-types'; +import { Box } from 'grommet'; + +export const TabContent = ({ children }) => { + return ( + + {children} + + ); +}; + +TabContent.propTypes = { + children: PropTypes.node.isRequired, +}; diff --git a/sandbox/grommet-app/src/pages/sticker-sheet/components/index.js b/sandbox/grommet-app/src/pages/sticker-sheet/components/index.js new file mode 100644 index 000000000..a21ff1336 --- /dev/null +++ b/sandbox/grommet-app/src/pages/sticker-sheet/components/index.js @@ -0,0 +1,4 @@ +export * from './Compare'; +export * from './ModeContext'; +export * from './StyleInProgress'; +export * from './TabContent'; diff --git a/sandbox/grommet-app/src/pages/sticker-sheet/content/Controls/Accordions.jsx b/sandbox/grommet-app/src/pages/sticker-sheet/content/Controls/Accordions.jsx new file mode 100644 index 000000000..26650fe89 --- /dev/null +++ b/sandbox/grommet-app/src/pages/sticker-sheet/content/Controls/Accordions.jsx @@ -0,0 +1,16 @@ +import { Accordion, AccordionPanel } from 'grommet'; +import { Compare } from '../../components'; +import ContentPane from '../../../../components/ContentPane'; + +export const Accordions = () => { + return ( + + + + hi + hi + + + + ); +}; diff --git a/sandbox/grommet-app/src/pages/sticker-sheet/content/Controls/Buttons.jsx b/sandbox/grommet-app/src/pages/sticker-sheet/content/Controls/Buttons.jsx new file mode 100644 index 000000000..df2bf50c4 --- /dev/null +++ b/sandbox/grommet-app/src/pages/sticker-sheet/content/Controls/Buttons.jsx @@ -0,0 +1,46 @@ +import { Box, Button } from 'grommet'; +import { User } from 'grommet-icons'; +import ContentPane from '../../../../components/ContentPane'; +import { Compare } from '../../components/Compare'; + +const kinds = ['default', 'toolbar', 'secondary', 'primary']; +const states = ['enabled', 'active', 'disabled']; +const sizes = ['xsmall', 'small', 'medium', 'large', 'xlarge']; + +export const Buttons = () => { + return ( + + + {kinds.map(kind => + sizes.map(size => + states.map(state => ( + +