Shape

Documentation for the Stack shape API

Integration

  • Once Stack is in your node modules folder, put this in the styling file that you've made for your project:

@use '~@growstocks/stack/Core/Shape';

.my-component-class {
    @include Shape.apply(
        ...
    );
}

API

The 'apply()' Mixin

Parameter

Effect

$shape-theme

This parameter should contain a map of the shape theme. Refer to shape-theme injection.

Shape-Theme Injection

  • The shape-theme injection API is as follows:

    Parameter

    Effect

    'shape'

    STRING (unquoted) - Sets the shape of a component.

    'border-radius'

    INT - Sets the border-radius of a component. (Only applies to the rounded shape)

    'shape-exceptions'

    LIST - This is where you set what shapes are to be exclued for this component.

    Color-Theme Injection Implementation Example

    @use '~@growstocks/stack/Core/Shape';
    
    $_shape-theme: (
        'shape': default,
        'border-radius': 0.3rem,
        'shape-exceptions': (),
    );
    
    .my-component-class {
        @include Shape.apply($_shape-theme);
    }

Last updated

Was this helpful?