Skip to content

create space between panes inside a container #1488

Discussion options

You must be logged in to vote

Hey @GhostOrder28! While we don't have something out of the box that can do this, you could do this by pulling in glamor and making a utility component for spacing with something like this:

import { Pane, PaneProps } from "evergreen-ui";
import React from "react";
import { css } from "glamor";

interface SpaceProps {
  props: Pick<
    PaneProps,
    | "margin"
    | "marginBottom"
    | "marginLeft"
    | "marginRight"
    | "marginTop"
    | "marginX"
    | "marginY"
  >;
  children: React.ReactNode;
}

const Space: React.FC<SpaceProps> = (props) => {
  const { props: paneProps, children } = props;

  const className = css({
    "& > *": paneProps
  }).toString();

  return <Pane className

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@GhostOrder28
Comment options

@brandongregoryscott
Comment options

Answer selected by GhostOrder28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants