How to use react-uwp - 10 common examples

To help you get started, we’ve selected a few react-uwp 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 myxvisual / react-uwp / docs / src / routes / index.tsx View on Github external
import * as MobileDetect from "mobile-detect";
const md = new MobileDetect(window.navigator.userAgent);

import Theme from "react-uwp/Theme";
import getTheme from "react-uwp/styles/getTheme";
import Wrapper from "../components/Wrapper";
import WrapperWithCategories from "../components/WrapperWithCategories";

export interface RouterCallback {
  (error: any, component?: any): void;
}

const useFluentDesign = true;
const desktopBackgroundImage = require("assets/images/blurBackground/jennifer-bailey-10753.jpg");
// const theme = getTheme({ useFluentDesign, desktopBackgroundImage, materialBackground: `url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 16 16' style='enable-background:new 0 0 16 16' xml:space='preserve'%3E%3Crect width='16' fill='none' height='16'/%3E%3Crect x='0' y='0' fill='hsla(0, 0%, 100%, 0.3)' width='1' height='1'/%3E%3C/svg%3E") repeat top right / 16px` });
const theme = getTheme({ useFluentDesign, desktopBackgroundImage });
const isMobile = Boolean(md.mobile());

const useBackdropCSS = {
  enableNoiseTexture: true,
  forceGenerateAcrylicTextures: false
};
const useCanvasAcrylic = {
  enableNoiseTexture: true,
  forceGenerateAcrylicTextures: true
};

export class ThemeWrapper extends React.Component {
  render() {
    const { children } = this.props;
    return (
github myxvisual / vscode-ts-uml / src / WebView / components / Board.tsx View on Github external
markerHeight={arrowSize * 2}
              markerWidth={arrowSize}
              refY={arrowSize}
              refX="0"
            >
github myxvisual / react-uwp / docs / src / routes / Home / components / CustomTheme.tsx View on Github external
onChangeValue={value => {
                  theme.updateTheme(getTheme({
                    themeName: value.toLowerCase() as any,
                    accent: theme.accent,
                    useFluentDesign: theme.useFluentDesign,
                    desktopBackgroundImage: theme.desktopBackgroundImage
                  }));
                }}
              />
github myxvisual / react-uwp / docs / src / components / Wrapper / index.tsx View on Github external
onClick: () => {
                theme.updateTheme(getTheme({
                  themeName: theme.isDarkTheme ? "light" : "dark",
                  accent: theme.accent,
                  useFluentDesign: theme.useFluentDesign,
                  desktopBackgroundImage: theme.desktopBackgroundImage
                }));
              }
            }]}
github zeit / next.js / examples / with-react-uwp / pages / index.js View on Github external
render() {
    const { userAgent } = this.props
    return (
      
        <button>Test Button</button>
        
        
        
        <p style="{{">{userAgent.slice(12)}...</p>
      
    )
  }
}
github myxvisual / react-uwp / docs / src / components / DoubleThemeRender.tsx View on Github external
render() {
    const { children, direction, themeStyle, useBorder, useChromeColor, useSingleTheme, newTheme, ...attributes } = this.props;
    const darkTheme = getTheme({ themeName: "dark", accent: this.context.theme.accent });
    const { prefixStyle } = darkTheme;
    const lightTheme = getTheme({ themeName: "light", accent: this.context.theme.accent });
    const isColumn = direction === "column";
    const currThemeStyle: React.CSSProperties = prefixStyle({
      width: "50%",
      minHeight: 240,
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      ...themeStyle
    });

    const { theme } = this.context;

    return useSingleTheme || theme.useFluentDesign ? (
github myxvisual / react-uwp / docs / src / routes / Styles / CustomTheme / SimpleExample.tsx View on Github external
onCheck={useFluentDesign => {
                theme.updateTheme(getTheme({
                  themeName: theme.themeName,
                  accent: theme.accent,
                  useFluentDesign,
                  desktopBackgroundImage: theme.desktopBackgroundImage
                }));
              }}
            />
github myxvisual / react-uwp / docs / src / components / DoubleThemeRender.tsx View on Github external
render() {
    const { children, direction, themeStyle, useBorder, useChromeColor, useSingleTheme, newTheme, ...attributes } = this.props;
    const darkTheme = getTheme({ themeName: "dark", accent: this.context.theme.accent });
    const { prefixStyle } = darkTheme;
    const lightTheme = getTheme({ themeName: "light", accent: this.context.theme.accent });
    const isColumn = direction === "column";
    const currThemeStyle: React.CSSProperties = prefixStyle({
      width: "50%",
      minHeight: 240,
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      ...themeStyle
    });

    const { theme } = this.context;

    return useSingleTheme || theme.useFluentDesign ? (
github myxvisual / react-uwp / docs / src / routes / Components / Theme / SimpleExample.tsx View on Github external
<p>Dark Theme without Fluent Design</p>
          
          
          
        

        
          <p>Light Theme without Fluent Design</p>
github steamgriddb / steamgriddb-manager / src / js / Settings.js View on Github external
render() {
        const baseStyle = React.CSSProperties = {
            margin: '10px 0'
        };

        const descStyle = {
            ...
            getTheme().typographyStyles.base,
            color: getTheme().baseMedium
        };

        return (
            <div>
                <h5 style="{getTheme().typographyStyles.subTitle}">API Key</h5>
                <p style="{descStyle}">
                    Your API key can be found in your preferences page on steamgriddb.com.
                </p>
                
            </div>
        )
    }
}

react-uwp

UWP Design & Fluent Design UiKit by React

MIT
Latest version published 3 years ago

Package Health Score

39 / 100
Full package analysis