src/FlexItem.tsx

gestalt · packages/gestalt/src/FlexItem.tsx · typescript · Apache-2.0
ui

Control flex child layout behavior and alignment within Flex containers.

// Source: https://github.com/pinterest/gestalt | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { forwardRef, ReactNode } from 'react';
import { buildStyles } from './boxTransforms';
import styles from './Flex.css';

type Dimension = number | string;

export type Props = {
  /**
   * Allows the default alignment (or the one specified by `align-items`) to be overridden for the individual flex item.
   */
  alignSelf?: 'auto' | 'start' | 'end' | 'center' | 'baseline' | 'stretch';
  /**
   *
   */
  children?: ReactNode;
  /**
   * Used to identify the element for testing purposes.
   */
  dataTestId?: string;
  /**
   * Defines how the flex item will be sized. `"grow"`, equiv

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key