How to use the react-view.useValueDebounce function in react-view

To help you get started, we’ve selected a few react-view 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 uber / baseweb / documentation-site / components / yard / knob.tsx View on Github external
}> = ({
  name,
  error,
  type,
  val: globalVal,
  set: globalSet,
  options = {},
  description,
  placeholder,
  enumName,
}) => {
  const [val, set] = useValueDebounce(globalVal, globalSet);
  const [css, theme] = useStyletron();
  switch (type) {
    case PropTypes.Ref:
      return (
        
          <label>{name}</label>
          
            React Ref documentation
github uber / baseweb / documentation-site / components / yard / editor.tsx View on Github external
const plainStyles = theme.name.startsWith('light-theme')
    ? lightTheme
    : darkTheme;
  const editorTheme = {
    ...plainStyles,
    plain: {
      ...plainStyles.plain,
      fontSize: small ? '13px' : '14px',
      whiteSpace: 'break-spaces',
      backgroundColor: focused
        ? theme.colors.inputFillActive
        : theme.colors.inputFill,
    },
  };

  const [code, setCode] = useValueDebounce(globalCode, onChange);

  return (
github uber / baseweb / documentation-site / components / yard / theme-editor.tsx View on Github external
}&gt; = ({themeKey, themeInit, globalSet, globalColor}) =&gt; {
  const [css, $theme] = useStyletron();
  const [color, setColor] = useValueDebounce(globalColor, globalSet);

  return (
    <label>
      <div></div>
      </label>