3.0 beta 2

AX.Border

Implements component border.

Referenced by layers collection.

Show/hide

Assign true/false to the border property.

var obj = new AX.Component({
    classes: 'my-component',
    border: true
});

Inline styles

Accessible via border() object -

obj.border().styles({
    'border': '1px solid red',
});

The styles can be dynamic when the value is a template or function -

obj.border().style('border-color', function(data){
    return data && (data.total < 0) ? 'red' : '';
});

CSS

Use parent selector -

.my-component>.ax-border {
    border-color: #def;
    border-width: 0 1px 0 0;
}