4.0.0 • Published 5 years ago

@blueeast/bluerain-ui-interfaces v4.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

BlueRain UI Interfaces

A UI interfaces collection to align the components development process across all platforms. React components build using these interfaces supposedly should work on Web, Mobile (iOS and Android) and Desktop.

🎊 Status

Greenkeeper badge

Usage

Run the following command in the plugin directoy:

npm i --save @blueeast/bluerain-ui-interfaces

List of Interfaces

Following component interfaces have been defined and exposed through this repo.

Example Implementation of Interface

  • First export interface from bluerain-ui-interfaces repo.
import { TextInputProperties } from '@blueeast/bluerain-ui-interfaces';
  • Then extend/implement interface for component you intend to develop
export interface MUITextInputProperties extends TextInputProperties {
 autoComplete?: string,
 autoCorrect?: string,
 id?: string,
 label?: string,
 className?: any,
 margin?: 'none' |
    'dense' |
    'normal',
 required?: boolean,
 error?: boolean,
 type?: string,
 rowsMax?: string,
 rows?: string,
 helperText?: ReactNode,
 InputLabelProps?: object,
 fullWidth?: boolean,
 errorText?: ReactNode,
}
  • Then use above extended interface for component development
const BlueRainTextInput: React.StatelessComponent<MUITextInputProperties> = (rawProps) => {
 const { onChangeText , ...props } = rawProps;
 let disabled = false;
 if(props.editable !== undefined && !props.editable) {
  disabled = true;
 }
 return (
 <TextField
  onChange={(props.onChange || onChangeText) ? customOnChange(rawProps) : () => {return null;}}
  rows={props.numberOfLines}
  helperText={props.errorText}
  {...props}
 />
 );
};

export default BlueRainTextInput;

Notice how props from interface have been mapped to material-ui textinput props. For exmaple rows has been mapped numberOfLines.

4.0.0

5 years ago

4.0.0-beta.9

5 years ago

4.0.0-beta.8

6 years ago

4.0.0-beta.7

6 years ago

4.0.0-beta.6

6 years ago

4.0.0-beta.5

6 years ago

4.0.0-beta.4

6 years ago

4.0.0-beta.3

6 years ago

4.0.0-beta.2

6 years ago

4.0.0-beta.1

6 years ago

3.2.12

6 years ago

3.2.11

6 years ago

3.2.10

6 years ago

3.2.9

6 years ago

3.4.0

6 years ago

3.2.8

6 years ago

3.2.7

6 years ago

3.2.6

6 years ago

3.2.5

6 years ago

3.2.4

6 years ago

3.2.3

6 years ago

3.3.1

6 years ago

3.3.0

6 years ago

3.2.2

6 years ago

3.2.1

6 years ago

3.2.0

6 years ago

3.1.4

6 years ago

3.1.3

6 years ago

3.1.2

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.0

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago