How to use the baseui.useStyletron 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 / layer / layer-z-index.tsx View on Github external
function Wrapper(props: any) {
  const [css] = useStyletron();
  const {offset, color, children, forwardedRef} = props;
  return (
github uber / baseweb / documentation-site / examples / progress-steps / dotted.tsx View on Github external
function ProgressStepsContainer() {
  const [current, setCurrent] = React.useState(0);
  const [css, theme] = useStyletron();

  return (
    
      
        <div>
          Here is some step content
        </div>
github uber / baseweb / documentation-site / examples / progress-steps / numbered.tsx View on Github external
function ProgressStepsContainer() {
  const [current, setCurrent] = React.useState(0);
  const [css, theme] = useStyletron();
  return (
    
      
        <div>
          Here is some step content
        </div>
        Previous
         setCurrent(1)}&gt;
          Next
        
      
      
        <div>
          Here is some more content
        </div>
         setCurrent(0)}&gt;
github uber / baseweb / documentation-site / examples / checkbox / indeterminate.tsx View on Github external
function GroupList() {
  const [css, theme] = useStyletron();
  const [checkboxes, setCheckboxes] = React.useState([true, false]);

  const allChecked = checkboxes.every(Boolean);
  const isIndeterminate = checkboxes.some(Boolean) &amp;&amp; !allChecked;

  return (
    <div>
       {
          const target = e.target as HTMLInputElement;
          setCheckboxes([target.checked, target.checked]);
        }}
        isIndeterminate={isIndeterminate}
        checked={allChecked}
      &gt;
        Indeterminate checkbox if not all subcheckboxes are checked</div>
github uber / baseweb / documentation-site / examples / slider / custom-ticks.js View on Github external
function CustomTicks() {
  const [value, setValue] = React.useState([4500]);
  const [css, theme] = useStyletron();
  return (
     {
        if (params.value) {
          setValue(params.value);
        } else {
          setValue([]);
        }
      }}
      overrides={{
        ThumbValue: ({$value}) =&gt; (
github uber / baseweb / documentation-site / examples / table-grid / nested.js View on Github external
function Tasks(props) {
  const [css] = useStyletron();
  return (
    <div>
      
        Task
        Status
        Last Run
        Details
        {props.tasks.map((task, index) =&gt; {
          return (
            
              {task[0]}</div>
github uber / baseweb / documentation-site / examples / input / before-after.js View on Github external
function After() {
  const [css, theme] = useStyletron();
  return (
    <div>
      
    </div>
  );
}
github uber / baseweb / documentation-site / examples / form-control / validation.js View on Github external
function Negative() {
  const [css, theme] = useStyletron();
  return (
    <div>
      
    </div>
  );
}
github uber / baseweb / documentation-site / examples / input / before-after.tsx View on Github external
function Negative() {
  const [css, theme] = useStyletron();
  return (
    <div>
      
    </div>
  );
}
github uber / baseweb / documentation-site / examples / layer / basic.js View on Github external
function Wrapper(props: any) {
  const [css] = useStyletron();
  const {offset, color, children, forwardedRef} = props;
  return (