3.0.0 • Published 5 years ago

@billes/components v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Billes Components

Install

yarn add @billes/components

Action

 <Action icon={ <ReactComponent /> } label={ 'Some label' } action={() => { console.log('hello world')}}>
{
    action = null // fn to be called on click,
    disabled = false // unable to use action and hovering is off
    icon = null, // An object, component or a string that would be used as img-src
    link = null, // Shows as link in statusfield, converts from button to a
    label // Label to be displayed
    style = {} // Custom styling of action. caveats: background must be hex
    flip = false // puts the icon on the right side with label still aligned to the left 
}

Icon object passed to action

icon: {
    component: <Component />,
    width: 40 // integer for setting a custom width. Height is locked to 24px or less depending on main style
}

Dropdown

Dropdown is basically an elaborate collection of \. The dropdown button itself is converted to \ with a custom action that displays items. The items will convert to a list of \. The dropdown will expand left or up if it will render outside of viewport

NOTE: items array does not take the \ (the react-component) as a valid item

 <Dropdown icon={ <ReactComponent /> } name={ 'Label' } items={ items } />
disabled = false // unable to use action and hovering is off
icon // A component or a string that would be used as img-src
items: [
  {
    action = null // fn to be called on click,
    disabled = false // unable to use action and hovering is off
    icon = null, // A component or a string that would be used as img-src
    link = null, // Shows as link in statusfield, converts from button to a
    label // Label to be displayed
    style = {} // Custom styling of action. caveats: background must be hex
    flip = false // puts the icon on the right side with label still aligned to the left 
  }
],
label // Label to be displayed
style = {} // Custom styling of action
flip = false // puts the icon on the right side with label still aligned to the left 
wrapper = false // It can expand up or left based on a wrapper as well as a window. Wants an id of an element (no pound/hash sign)
chevron = false // if you want to display chevron or not 
3.0.0

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.3.2

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago