How to use the @ui5/webcomponents-react/lib/TextAlign.TextAlign.Begin function in @ui5/webcomponents-react

To help you get started, we’ve selected a few @ui5/webcomponents-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / ui5-webcomponents-react / packages / main / src / components / AnalyticalTable / hooks / useCellStyling.ts View on Github external
export const useCellStyling = ({ rowHeight }, classes) => ({ column }) => {
  const style: CSSProperties = {};

  if (rowHeight) {
    style.height = `${rowHeight}px`;
  }
  switch (column.hAlign) {
    case TextAlign.Begin:
      style.justifyContent = 'flex-start';
      break;
    case TextAlign.Center:
      style.justifyContent = 'center';
      break;
    case TextAlign.End:
      style.justifyContent = 'flex-end';
      break;
    case TextAlign.Left:
      style.justifyContent = 'left';
      break;
    case TextAlign.Right:
      style.justifyContent = 'right';
      break;
  }
  switch (column.vAlign) {
github SAP / ui5-webcomponents-react / packages / main / src / components / AnalyticalTable / hooks / useTableCellStyling.ts View on Github external
hooks.getCellProps.push((cellProps, { cell: { column }, instance }) => {
    const { classes, rowHeight } = instance.webComponentsReactProperties;
    const style: CSSProperties = {};

    if (rowHeight) {
      style.height = `${rowHeight}px`;
    }

    switch (column.hAlign) {
      case TextAlign.Begin:
        style.textAlign = 'start';
        break;
      case TextAlign.Center:
        style.textAlign = 'center';
        break;
      case TextAlign.End:
        style.textAlign = 'end';
        break;
      case TextAlign.Left:
        style.textAlign = 'left';
        break;
      case TextAlign.Right:
        style.textAlign = 'right';
        break;
    }
    switch (column.vAlign) {

@ui5/webcomponents-react

React Wrapper for UI5 Web Components and additional components

Apache-2.0
Latest version published 4 days ago

Package Health Score

90 / 100
Full package analysis

Similar packages