How to use the baseui/button.SIZE.compact function in baseui

To help you get started, we’ve selected a few baseui 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 / examples / notification / custom-dismiss.js View on Github external
{({dismiss}) => (
      <button size="{SIZE.compact}">
        Dismiss
      </button>
    )}
github uber / react-view / src / override.tsx View on Github external
const [, theme] = useStyletron();
  const isLightTheme = theme.name.startsWith('light-theme');
  const code = overridesObj[overrideKey] ? overridesObj[overrideKey].style : '';
  return (
    
       {
          set({
            ...overrides.value,
            [overrideKey]: {style: newCode, active: true},
          });
        }}
        code={code}
      /&gt;
       ({
              marginTop: $theme.sizing.scale300,
              [`@media screen and (max-width: ${$theme.breakpoints.medium}px)`]: {
                flexWrap: 'wrap',
              },
            }),
          },
        }}
      &gt;
        <button kind="{KIND.tertiary}"> {
            set({
              ...overrides.value,</button>
github uber / react-view / src / base / knobs.tsx View on Github external
className={useCss({
          display: 'flex',
          flexWrap: 'wrap',
          [theme.mediaQuery.medium]: {
            flexWrap: 'nowrap',
          },
          margin: `0 -${theme.sizing.scale600}`,
        })}
      &gt;
        
        
      
      {filteredKnobNames.length !== allKnobNames.length &amp;&amp; (
        <button size="{SIZE.compact}" kind="{KIND.tertiary}"> setShowAllKnobs(!showAllKnobs)}
        &gt;
          {showAllKnobs ? 'Show only basic props' : 'Show all props'}
        </button>
      )}
    
  );
};
github uber / baseweb / documentation-site / components / yard / knobs.tsx View on Github external
state={state}
          knobNames={firstGroup}
          set={set}
          error={error}
        /&gt;
        
      
      {filteredKnobNames.length !== allKnobNames.length &amp;&amp; (
        <button size="{SIZE.compact}" kind="{KIND.tertiary}"> setShowAllKnobs(!showAllKnobs)}
        &gt;
          {showAllKnobs ? 'Show only basic props' : 'Show all props'}
        </button>
      )}
    
  );
};
github uber / baseweb / documentation-site / examples / checkbox / focus.js View on Github external
export default () =&gt; {
  const [checked, setChecked] = React.useState(true);
  const [focused, setFocused] = React.useState(false);
  const inputRef = React.useRef(null);
  return (
    
      <button size="{SIZE.compact}"> {
          if (inputRef.current === null) return;
          if (focused) {
            inputRef.current.blur();
            setFocused(false);
          } else {
            inputRef.current.focus();
            setFocused(true);
          }
        }}
      &gt;
        Click to focus checkbox
      </button>
github uber / react-view / src / yard.tsx View on Github external
//updateUrl({ pathname, code: newCode, queryStringName })
          } catch (e) {
            updateCode(dispatch, newCode);
          }
        }}
        transformToken={tokenProps =&gt; {
          const token = tokenProps.children.trim();
          if (mapTokensToProps &amp;&amp; mapTokensToProps[token]) {
            return ;
          }
          return <span>;
        }}
      /&gt;
      
       ({
              flexWrap: 'wrap',
              marginTop: $theme.sizing.scale300,
            }),
          },
        }}
      &gt;
        <button kind="{KIND.tertiary}"> {
            updateCode(dispatch, formatCode(state.code));
          }}
        &gt;
          Format</button></span>
github uber / baseweb / documentation-site / components / layout.js View on Github external
Block: {
                        style: {
                          [direction === 'rtl' ? 'left' : 'right']: 0,
                          [direction === 'rtl' ? 'right' : 'left']: 'auto',
                        },
                      },
                    }}
                  &gt;
                    <button> (
                        
                      )}
                      $as="a"
                      href={githubUrl}
                      target="_blank"
                      size={SIZE.compact}
                      kind={KIND.minimal}
                    &gt;
                      Edit this page
                    </button>
                  
                )}
                {componentSizeKb ? (
                  
                    Component size, gzipped: {componentSizeKb}kb
                  
                ) : null}
                
                  {children}
github uber / baseweb / documentation-site / examples / button / sizes.js View on Github external
export default () =&gt; {
  const [css, theme] = useStyletron();
  const space = css({marginBottom: theme.sizing.scale300});
  return (
    
      <button size="{SIZE.compact}">Compact size</button>
      <div>
      <button size="{SIZE.default}">Default size</button>
      <div>
      <button size="{SIZE.large}">Large size</button>
    
  );
};
</div></div>
github uber / react-view / src / base / override.tsx View on Github external
const [, theme] = useStyletron();
  const isLightTheme = theme.name.startsWith('light-theme');
  const code = overridesObj[overrideKey] ? overridesObj[overrideKey].style : '';
  return (
    
       {
          set({
            ...overrides.value,
            [overrideKey]: {style: newCode, active: true},
          });
        }}
        code={code}
      /&gt;
       ({
              marginTop: $theme.sizing.scale300,
              [`@media screen and (max-width: ${$theme.breakpoints.medium}px)`]: {
                flexWrap: 'wrap',
              },
            }),
          },
        }}
      &gt;
        <button kind="{KIND.tertiary}"> {
            set({
              ...overrides.value,</button>
github uber / baseweb / documentation-site / components / header-navigation.js View on Github external
display: 'none',
                          '@media screen and (min-width: 820px)': {
                            display: 'inline-block',
                          },
                        },
                      },
                    }}
                  &gt;
                    {"What's new in v9?"}
                  
                
              
              
                
                  <button kind="{KIND.minimal}" size="{SIZE.compact}">
                    Components
                  </button>