How to use the @ui5/webcomponents-react-base/lib/Device.Device.system function in @ui5/webcomponents-react-base

To help you get started, we’ve selected a few @ui5/webcomponents-react-base 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 / ActionSheet / index.tsx View on Github external
(props: ActionSheetPropTypes, ref: RefObject) => {
    const { children, placement, openBy, style, slot } = props;

    const classes = useStyles();

    const actionSheetClasses = StyleClassHelper.of(classes.actionSheet);
    if (Device.system.tablet) {
      actionSheetClasses.put(classes.tablet);
    } else if (Device.system.phone) {
      actionSheetClasses.put(classes.phone);
    }

    const popoverRef: RefObject = useConsolidatedRef(ref);

    const renderActionSheetButton = (element) => {
      if (element && element.props) {
        return (
          <div>
            {cloneElement(element, {
              design: ButtonDesign.Transparent,
              onClick: onActionButtonClicked(element.props.onClick)
            })}
          </div>
github SAP / ui5-webcomponents-react / packages / main / src / components / ActionSheet / index.tsx View on Github external
(props: ActionSheetPropTypes, ref: RefObject) =&gt; {
    const { children, placement, openBy, style, slot } = props;

    const classes = useStyles();

    const actionSheetClasses = StyleClassHelper.of(classes.actionSheet);
    if (Device.system.tablet) {
      actionSheetClasses.put(classes.tablet);
    } else if (Device.system.phone) {
      actionSheetClasses.put(classes.phone);
    }

    const popoverRef: RefObject = useConsolidatedRef(ref);

    const renderActionSheetButton = (element) =&gt; {
      if (element &amp;&amp; element.props) {
        return (
          <div>
            {cloneElement(element, {
              design: ButtonDesign.Transparent,
              onClick: onActionButtonClicked(element.props.onClick)
            })}
          </div>
        );
      }