@workday/canvas-kit-docs
Version:
Documentation components of Canvas Kit components
16 lines (15 loc) • 873 B
JavaScript
import * as React from 'react';
import { Box } from '@workday/canvas-kit-react/layout';
const baseStyles = {
color: 'blackPepper500',
margin: 'xxs',
height: 'xl',
width: '8rem',
padding: 'xs',
};
export const Position = () => {
return (React.createElement(React.Fragment, null,
React.createElement(Box, { backgroundColor: "cinnamon300", left: 0, position: "absolute", top: "calc(50% - 20px)", zIndex: 1, textAlign: "center", ...baseStyles }, "Left"),
React.createElement(Box, { backgroundColor: "sourLemon300", left: `calc(50% - 4rem)`, position: "absolute", top: "calc(50% - 20px)", zIndex: 2, textAlign: "center", ...baseStyles }, "Center"),
React.createElement(Box, { backgroundColor: "blueberry300", position: "absolute", right: 0, top: "calc(50% - 20px)", zIndex: 3, textAlign: "center", ...baseStyles }, "Right")));
};